├── README.md
├── art
├── Android应用源代码的保护与破解.pdf
├── Android插件化-1.pdf
├── md_anim
│ ├── Transition.gif
│ ├── ciecular_reveal.gif
│ ├── custom_wujie.gif
│ ├── custom_youjie.gif
│ ├── custom_youjie_mask.gif
│ ├── selectableItemBackground.gif
│ ├── selectableItemBackgroundBorderless.gif
│ ├── shareelement.gif
│ └── shareelement.png
└── progressdrawable.gif
├── source_code
├── IntentWrapper.java
├── arsc_about
│ └── arsc_decode
│ │ ├── README.md
│ │ ├── constants.py
│ │ ├── constants.pyc
│ │ ├── parse.py
│ │ ├── res
│ │ ├── __init__.py
│ │ ├── __init__.pyc
│ │ ├── res_struct.py
│ │ └── res_struct.pyc
│ │ └── test
├── databinding
│ └── CheckBoxBindingAdapter.java
├── hotfix_about
│ └── hotfixdemo
│ │ ├── .externalNativeBuild
│ │ └── cmake
│ │ │ ├── debug
│ │ │ └── armeabi
│ │ │ │ ├── .ninja_deps
│ │ │ │ ├── .ninja_log
│ │ │ │ ├── CMakeCache.txt
│ │ │ │ ├── CMakeFiles
│ │ │ │ ├── 3.6.0-rc2
│ │ │ │ │ ├── CMakeCCompiler.cmake
│ │ │ │ │ ├── CMakeCXXCompiler.cmake
│ │ │ │ │ ├── CMakeDetermineCompilerABI_C.bin
│ │ │ │ │ ├── CMakeDetermineCompilerABI_CXX.bin
│ │ │ │ │ └── CMakeSystem.cmake
│ │ │ │ ├── CMakeOutput.log
│ │ │ │ ├── TargetDirectories.txt
│ │ │ │ ├── cmake.check_cache
│ │ │ │ └── native-lib.dir
│ │ │ │ │ └── src
│ │ │ │ │ └── main
│ │ │ │ │ └── cpp
│ │ │ │ │ └── native-lib.cpp.o
│ │ │ │ ├── android_gradle_build.json
│ │ │ │ ├── build.ninja
│ │ │ │ ├── cmake_build_command.txt
│ │ │ │ ├── cmake_build_output.txt
│ │ │ │ ├── cmake_install.cmake
│ │ │ │ └── rules.ninja
│ │ │ └── release
│ │ │ └── armeabi
│ │ │ ├── CMakeCache.txt
│ │ │ ├── CMakeFiles
│ │ │ ├── 3.6.0-rc2
│ │ │ │ ├── CMakeCCompiler.cmake
│ │ │ │ ├── CMakeCXXCompiler.cmake
│ │ │ │ ├── CMakeDetermineCompilerABI_C.bin
│ │ │ │ ├── CMakeDetermineCompilerABI_CXX.bin
│ │ │ │ └── CMakeSystem.cmake
│ │ │ ├── CMakeOutput.log
│ │ │ ├── TargetDirectories.txt
│ │ │ └── cmake.check_cache
│ │ │ ├── android_gradle_build.json
│ │ │ ├── build.ninja
│ │ │ ├── cmake_build_command.txt
│ │ │ ├── cmake_build_output.txt
│ │ │ ├── cmake_install.cmake
│ │ │ └── rules.ninja
│ │ ├── .gitignore
│ │ ├── CMakeLists.txt
│ │ ├── build.gradle
│ │ ├── hotfixdemo.iml
│ │ ├── proguard-rules.pro
│ │ └── src
│ │ ├── androidTest
│ │ └── java
│ │ │ └── com
│ │ │ └── guolei
│ │ │ └── hotfixdemo
│ │ │ └── ExampleInstrumentedTest.java
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── cpp
│ │ │ └── native-lib.cpp
│ │ ├── java
│ │ │ └── com
│ │ │ │ ├── guolei
│ │ │ │ └── hotfixdemo
│ │ │ │ │ ├── Log.java
│ │ │ │ │ ├── LogFix.java
│ │ │ │ │ ├── MainActivity.java
│ │ │ │ │ ├── MethodSizeCase.java
│ │ │ │ │ ├── MyApplication.java
│ │ │ │ │ ├── PatchResource.java
│ │ │ │ │ ├── PatchSo.java
│ │ │ │ │ ├── ReplaceUtil.java
│ │ │ │ │ └── User.java
│ │ │ │ └── tmall
│ │ │ │ └── wireless
│ │ │ │ └── jandfix
│ │ │ │ ├── Constants.java
│ │ │ │ ├── IMethodReplace.java
│ │ │ │ ├── IMethodSize.java
│ │ │ │ ├── MethodReplace5_0.java
│ │ │ │ ├── MethodReplace5_1.java
│ │ │ │ ├── MethodReplace6_0.java
│ │ │ │ ├── MethodReplaceArt4_0.java
│ │ │ │ ├── MethodReplaceDalvik4_0.java
│ │ │ │ ├── MethodReplaceProxy.java
│ │ │ │ ├── MethodSize5_1.java
│ │ │ │ ├── MethodSize6_0.java
│ │ │ │ ├── MethodSizeCase.java
│ │ │ │ ├── MethodSizeUtils.java
│ │ │ │ └── UnsafeProxy.java
│ │ └── res
│ │ │ ├── drawable-v24
│ │ │ └── ic_launcher_foreground.xml
│ │ │ ├── drawable
│ │ │ └── ic_launcher_background.xml
│ │ │ ├── layout
│ │ │ └── activity_main.xml
│ │ │ ├── mipmap-anydpi-v26
│ │ │ ├── ic_launcher.xml
│ │ │ └── ic_launcher_round.xml
│ │ │ ├── mipmap-hdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-mdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ └── values
│ │ │ ├── colors.xml
│ │ │ ├── strings.xml
│ │ │ └── styles.xml
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── guolei
│ │ └── hotfixdemo
│ │ └── ExampleUnitTest.java
├── nestedscroll
│ └── StickNavLayout.java
├── plugin_about
│ ├── Android插件化-1.pdf
│ ├── Android插件化-2.pdf
│ ├── README.md
│ ├── plugin_1.apk
│ ├── plugin_1
│ │ ├── .gitignore
│ │ ├── build.gradle
│ │ ├── plugin_1.iml
│ │ ├── proguard-rules.pro
│ │ └── src
│ │ │ ├── androidTest
│ │ │ └── java
│ │ │ │ └── com
│ │ │ │ └── guolei
│ │ │ │ └── plugin_1
│ │ │ │ └── ExampleInstrumentedTest.java
│ │ │ ├── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── java
│ │ │ │ └── com
│ │ │ │ │ └── guolei
│ │ │ │ │ └── plugin_1
│ │ │ │ │ ├── People.java
│ │ │ │ │ ├── PluginActivity.java
│ │ │ │ │ ├── PluginContentProvider.java
│ │ │ │ │ └── PluginReceiver.java
│ │ │ └── res
│ │ │ │ ├── drawable-v24
│ │ │ │ └── ic_launcher_foreground.xml
│ │ │ │ ├── drawable
│ │ │ │ └── ic_launcher_background.xml
│ │ │ │ ├── layout
│ │ │ │ └── activity_plugin.xml
│ │ │ │ ├── mipmap-anydpi-v26
│ │ │ │ ├── ic_launcher.xml
│ │ │ │ └── ic_launcher_round.xml
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ └── values
│ │ │ │ ├── colors.xml
│ │ │ │ ├── strings.xml
│ │ │ │ └── styles.xml
│ │ │ └── test
│ │ │ └── java
│ │ │ └── com
│ │ │ └── guolei
│ │ │ └── plugin_1
│ │ │ └── ExampleUnitTest.java
│ ├── plugin_so.apk
│ ├── plugin_so
│ │ ├── .externalNativeBuild
│ │ │ └── cmake
│ │ │ │ ├── debug
│ │ │ │ └── armeabi
│ │ │ │ │ ├── .ninja_deps
│ │ │ │ │ ├── .ninja_log
│ │ │ │ │ ├── CMakeCache.txt
│ │ │ │ │ ├── CMakeFiles
│ │ │ │ │ ├── 3.6.0-rc2
│ │ │ │ │ │ ├── CMakeCCompiler.cmake
│ │ │ │ │ │ ├── CMakeCXXCompiler.cmake
│ │ │ │ │ │ ├── CMakeDetermineCompilerABI_C.bin
│ │ │ │ │ │ ├── CMakeDetermineCompilerABI_CXX.bin
│ │ │ │ │ │ └── CMakeSystem.cmake
│ │ │ │ │ ├── CMakeOutput.log
│ │ │ │ │ ├── TargetDirectories.txt
│ │ │ │ │ ├── cmake.check_cache
│ │ │ │ │ └── native-lib.dir
│ │ │ │ │ │ └── src
│ │ │ │ │ │ └── main
│ │ │ │ │ │ └── cpp
│ │ │ │ │ │ └── native-lib.cpp.o
│ │ │ │ │ ├── android_gradle_build.json
│ │ │ │ │ ├── build.ninja
│ │ │ │ │ ├── cmake_build_command.txt
│ │ │ │ │ ├── cmake_build_output.txt
│ │ │ │ │ ├── cmake_install.cmake
│ │ │ │ │ └── rules.ninja
│ │ │ │ └── release
│ │ │ │ └── armeabi
│ │ │ │ ├── .ninja_deps
│ │ │ │ ├── .ninja_log
│ │ │ │ ├── CMakeCache.txt
│ │ │ │ ├── CMakeFiles
│ │ │ │ ├── 3.6.0-rc2
│ │ │ │ │ ├── CMakeCCompiler.cmake
│ │ │ │ │ ├── CMakeCXXCompiler.cmake
│ │ │ │ │ ├── CMakeDetermineCompilerABI_C.bin
│ │ │ │ │ ├── CMakeDetermineCompilerABI_CXX.bin
│ │ │ │ │ └── CMakeSystem.cmake
│ │ │ │ ├── CMakeOutput.log
│ │ │ │ ├── TargetDirectories.txt
│ │ │ │ ├── cmake.check_cache
│ │ │ │ └── native-lib.dir
│ │ │ │ │ └── src
│ │ │ │ │ └── main
│ │ │ │ │ └── cpp
│ │ │ │ │ └── native-lib.cpp.o
│ │ │ │ ├── android_gradle_build.json
│ │ │ │ ├── build.ninja
│ │ │ │ ├── cmake_build_command.txt
│ │ │ │ ├── cmake_build_output.txt
│ │ │ │ ├── cmake_install.cmake
│ │ │ │ └── rules.ninja
│ │ ├── .gitignore
│ │ ├── CMakeLists.txt
│ │ ├── build.gradle
│ │ ├── plugin_so.iml
│ │ ├── proguard-rules.pro
│ │ └── src
│ │ │ ├── androidTest
│ │ │ └── java
│ │ │ │ └── com
│ │ │ │ └── guolei
│ │ │ │ └── plugin_so
│ │ │ │ └── ExampleInstrumentedTest.java
│ │ │ ├── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── cpp
│ │ │ │ └── native-lib.cpp
│ │ │ ├── java
│ │ │ │ └── com
│ │ │ │ │ └── guolei
│ │ │ │ │ └── so
│ │ │ │ │ └── MainActivity.java
│ │ │ └── res
│ │ │ │ ├── drawable-v24
│ │ │ │ └── ic_launcher_foreground.xml
│ │ │ │ ├── drawable
│ │ │ │ └── ic_launcher_background.xml
│ │ │ │ ├── layout
│ │ │ │ ├── activity_main.xml
│ │ │ │ └── activity_plugin.xml
│ │ │ │ ├── mipmap-anydpi-v26
│ │ │ │ ├── ic_launcher.xml
│ │ │ │ └── ic_launcher_round.xml
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ └── values
│ │ │ │ ├── colors.xml
│ │ │ │ ├── strings.xml
│ │ │ │ └── styles.xml
│ │ │ └── test
│ │ │ └── java
│ │ │ └── com
│ │ │ └── guolei
│ │ │ └── plugin_so
│ │ │ └── ExampleUnitTest.java
│ ├── plugindemo-release-unsigned.apk
│ ├── plugindemo
│ │ ├── .gitignore
│ │ ├── build.gradle
│ │ ├── plugindemo.iml
│ │ ├── proguard-rules.pro
│ │ └── src
│ │ │ ├── androidTest
│ │ │ └── java
│ │ │ │ └── com
│ │ │ │ └── guolei
│ │ │ │ └── plugindemo
│ │ │ │ └── ExampleInstrumentedTest.java
│ │ │ ├── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── java
│ │ │ │ └── com
│ │ │ │ │ └── guolei
│ │ │ │ │ └── plugindemo
│ │ │ │ │ ├── Constants.java
│ │ │ │ │ ├── DelegateContentProvider.java
│ │ │ │ │ ├── MainActivity.java
│ │ │ │ │ ├── MyApplication.java
│ │ │ │ │ ├── StubService.java
│ │ │ │ │ ├── TestService.java
│ │ │ │ │ ├── TwoActivity.java
│ │ │ │ │ ├── binderhook
│ │ │ │ │ └── BinderHookHandler.java
│ │ │ │ │ └── core
│ │ │ │ │ ├── ActivityManagerProxy.java
│ │ │ │ │ └── HookInstrumentation.java
│ │ │ └── res
│ │ │ │ ├── drawable-v24
│ │ │ │ └── ic_launcher_foreground.xml
│ │ │ │ ├── drawable
│ │ │ │ └── ic_launcher_background.xml
│ │ │ │ ├── layout
│ │ │ │ ├── activity_main.xml
│ │ │ │ └── activity_two.xml
│ │ │ │ ├── mipmap-anydpi-v26
│ │ │ │ ├── ic_launcher.xml
│ │ │ │ └── ic_launcher_round.xml
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ └── values
│ │ │ │ ├── colors.xml
│ │ │ │ ├── strings.xml
│ │ │ │ └── styles.xml
│ │ │ └── test
│ │ │ └── java
│ │ │ └── com
│ │ │ └── guolei
│ │ │ └── plugindemo
│ │ │ └── ExampleUnitTest.java
│ └── simpledex.jar
└── simplerecyclerviewadapter
│ ├── .gitignore
│ ├── build.gradle
│ ├── proguard-rules.pro
│ ├── simplerecyclerviewadapter.iml
│ └── src
│ ├── androidTest
│ └── java
│ │ └── guolei
│ │ └── com
│ │ └── simplerecyclerviewadapter
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ ├── guolei
│ │ │ └── com
│ │ │ │ └── simplerecyclerviewadapter
│ │ │ │ ├── Item1.java
│ │ │ │ ├── Item2.java
│ │ │ │ ├── Item3.java
│ │ │ │ ├── ItemEmpty.java
│ │ │ │ └── MainActivity.java
│ │ └── simpleadapter
│ │ │ ├── BaseItem.java
│ │ │ ├── BaseViewHolder.java
│ │ │ └── SimpleRecyclerViewAdapter.java
│ └── res
│ │ ├── drawable-v24
│ │ └── ic_launcher_foreground.xml
│ │ ├── drawable
│ │ └── ic_launcher_background.xml
│ │ ├── layout
│ │ ├── activity_main.xml
│ │ ├── item_1.xml
│ │ ├── item_2.xml
│ │ ├── item_3.xml
│ │ ├── item_4.xml
│ │ └── item_empty.xml
│ │ ├── mipmap-anydpi-v26
│ │ ├── ic_launcher.xml
│ │ └── ic_launcher_round.xml
│ │ ├── mipmap-hdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-mdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ └── values
│ │ ├── colors.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ └── test
│ └── java
│ └── guolei
│ └── com
│ └── simplerecyclerviewadapter
│ └── ExampleUnitTest.java
└── xposed_about
├── Android最强黑科技-Xposed.pdf
└── out-dex2jar.jar
/README.md:
--------------------------------------------------------------------------------
1 | # blog_resource
2 | my personal blog resource
3 |
4 | * Xposed简介以及去小米桌面广告的简单实现 [](https://juejin.im/post/5a1017acf265da432840713d)
5 | * [自定义双向绑定](https://github.com/Guolei1130/blog_resource/blob/master/source_code/databinding/CheckBoxBindingAdapter.java)
6 | * source_code/plugin_about 下为Android插件化相关代码及PDF,其中的所有代码均在Nexus 5,Android 6.0的Dalvik虚拟机下测试通过
7 |
8 | * [一个简单的MockServer](https://github.com/Guolei1130/SimpleMockServer)
9 | * [解析ARSC文件的 python脚本,但是目前还有点小问题](https://github.com/Guolei1130/blog_resource/tree/master/source_code/arsc_about/arsc_decode)
10 | [](https://juejin.im/post/5ac5d015f265da239a600a72)
11 |
--------------------------------------------------------------------------------
/art/Android应用源代码的保护与破解.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/art/Android应用源代码的保护与破解.pdf
--------------------------------------------------------------------------------
/art/Android插件化-1.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/art/Android插件化-1.pdf
--------------------------------------------------------------------------------
/art/md_anim/Transition.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/art/md_anim/Transition.gif
--------------------------------------------------------------------------------
/art/md_anim/ciecular_reveal.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/art/md_anim/ciecular_reveal.gif
--------------------------------------------------------------------------------
/art/md_anim/custom_wujie.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/art/md_anim/custom_wujie.gif
--------------------------------------------------------------------------------
/art/md_anim/custom_youjie.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/art/md_anim/custom_youjie.gif
--------------------------------------------------------------------------------
/art/md_anim/custom_youjie_mask.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/art/md_anim/custom_youjie_mask.gif
--------------------------------------------------------------------------------
/art/md_anim/selectableItemBackground.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/art/md_anim/selectableItemBackground.gif
--------------------------------------------------------------------------------
/art/md_anim/selectableItemBackgroundBorderless.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/art/md_anim/selectableItemBackgroundBorderless.gif
--------------------------------------------------------------------------------
/art/md_anim/shareelement.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/art/md_anim/shareelement.gif
--------------------------------------------------------------------------------
/art/md_anim/shareelement.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/art/md_anim/shareelement.png
--------------------------------------------------------------------------------
/art/progressdrawable.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/art/progressdrawable.gif
--------------------------------------------------------------------------------
/source_code/arsc_about/arsc_decode/README.md:
--------------------------------------------------------------------------------
1 | ### 解析ARSC的python脚本
2 |
3 | 目前还有点问题
4 |
5 | 参考的尼古拉斯赵四的java版解析
--------------------------------------------------------------------------------
/source_code/arsc_about/arsc_decode/constants.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # -*- coding: UTF-8 -*-
3 |
4 |
5 | resStringPoolChunkOffset = 0
6 | packageChunkOffset = 0
7 | keyStringPoolChunkOffset=0
8 | typeStringPoolChunkOffset=0
9 |
10 | resTypeOffset=0
--------------------------------------------------------------------------------
/source_code/arsc_about/arsc_decode/constants.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/arsc_about/arsc_decode/constants.pyc
--------------------------------------------------------------------------------
/source_code/arsc_about/arsc_decode/parse.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # -*- coding: UTF-8 -*-
3 |
4 | import sys
5 |
6 | from struct import *
7 |
8 | import constants as constants
9 | import res.res_struct as rs
10 |
11 | def parseFile(params):
12 | if len(params) < 1:
13 | print "must have a file"
14 | exit(0)
15 | filePath = sys.argv[1]
16 | arscFile = open(filePath,"r+")
17 |
18 | # res_chunk_header = rs.res_chunk_header()
19 | # res_chunk_header.parse(arscFile)
20 |
21 | res_table_header = rs.res_table_header()
22 | res_table_header.parse(arscFile)
23 |
24 | res_string_pool_header = rs.res_string_pool_header()
25 | res_string_pool_header.parse(arscFile)
26 |
27 | res_package = rs.res_package()
28 | res_package.parse(arscFile)
29 |
30 | res_type_string_pool = rs.res_type_string_pool()
31 | res_type_string_pool.parse(arscFile)
32 |
33 | res_key_string_pool = rs.res_key_string_pool()
34 | res_key_string_pool.parse(arscFile)
35 |
36 | rs.parse_res(arscFile,filePath)
37 |
38 |
39 | arscFile.close()
40 | if __name__ == '__main__':
41 |
42 | parseFile(sys.argv)
--------------------------------------------------------------------------------
/source_code/arsc_about/arsc_decode/res/__init__.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # -*- coding: UTF-8 -*-
3 |
--------------------------------------------------------------------------------
/source_code/arsc_about/arsc_decode/res/__init__.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/arsc_about/arsc_decode/res/__init__.pyc
--------------------------------------------------------------------------------
/source_code/arsc_about/arsc_decode/res/res_struct.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/arsc_about/arsc_decode/res/res_struct.pyc
--------------------------------------------------------------------------------
/source_code/arsc_about/arsc_decode/test:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/arsc_about/arsc_decode/test
--------------------------------------------------------------------------------
/source_code/databinding/CheckBoxBindingAdapter.java:
--------------------------------------------------------------------------------
1 | package com;
2 |
3 | // _ _ _ _
4 | //__ _____ _ __| | _| |_(_) | ___
5 | //\ \ /\ / / _ \| '__| |/ / __| | |/ _ \
6 | // \ V V / (_) | | | <| |_| | | __/
7 | // \_/\_/ \___/|_| |_|\_\\__|_|_|\___|
8 |
9 |
10 | import android.databinding.BindingAdapter;
11 | import android.databinding.BindingMethods;
12 | import android.databinding.InverseBindingAdapter;
13 | import android.databinding.InverseBindingListener;
14 | import android.widget.CheckBox;
15 | import android.widget.CompoundButton;
16 |
17 | /**
18 | * Copyright © 2013-2017 Worktile. All Rights Reserved.
19 | * Author: guolei
20 | * Email: 1120832563@qq.com
21 | * Date: 17/11/21
22 | * Time: 下午2:27
23 | * Desc:
24 | */
25 | @BindingMethods({
26 |
27 | })
28 | public class CheckBoxBindingAdapter {
29 |
30 | @BindingAdapter("android:checked")
31 | public static void setChecked(CheckBox box, boolean checked) {
32 | if (box.isChecked() == checked) {
33 | return;
34 | }
35 | box.setChecked(checked);
36 | }
37 |
38 | @InverseBindingAdapter(attribute = "android:checked",event = "checkChangeListener")
39 | public static boolean getChecked(CheckBox box) {
40 | return box.isChecked();
41 | }
42 |
43 | @BindingAdapter(value = {"checkChangeListener"}, requireAll = false)
44 | public static void setCheckChangeListener(CheckBox box, final InverseBindingListener checkChangeListener) {
45 | box.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
46 | @Override
47 | public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
48 | if (checkChangeListener != null) {
49 | checkChangeListener.onChange();
50 | }
51 | }
52 | });
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/.externalNativeBuild/cmake/debug/armeabi/.ninja_deps:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/hotfix_about/hotfixdemo/.externalNativeBuild/cmake/debug/armeabi/.ninja_deps
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/.externalNativeBuild/cmake/debug/armeabi/.ninja_log:
--------------------------------------------------------------------------------
1 | # ninja log v5
2 | 0 346 0 CMakeFiles/native-lib.dir/src/main/cpp/native-lib.cpp.o cae960fe60d34b5b
3 | 347 453 0 ../../../../build/intermediates/cmake/debug/obj/armeabi/libnative-lib.so baf086bcaf754902
4 |
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/.externalNativeBuild/cmake/debug/armeabi/CMakeFiles/3.6.0-rc2/CMakeCCompiler.cmake:
--------------------------------------------------------------------------------
1 | set(CMAKE_C_COMPILER "/Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang")
2 | set(CMAKE_C_COMPILER_ARG1 "")
3 | set(CMAKE_C_COMPILER_ID "Clang")
4 | set(CMAKE_C_COMPILER_VERSION "")
5 | set(CMAKE_C_COMPILER_WRAPPER "")
6 | set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "")
7 | set(CMAKE_C_COMPILE_FEATURES "")
8 | set(CMAKE_C90_COMPILE_FEATURES "")
9 | set(CMAKE_C99_COMPILE_FEATURES "")
10 | set(CMAKE_C11_COMPILE_FEATURES "")
11 |
12 | set(CMAKE_C_PLATFORM_ID "")
13 | set(CMAKE_C_SIMULATE_ID "")
14 | set(CMAKE_C_SIMULATE_VERSION "")
15 |
16 | set(CMAKE_AR "/Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-ar")
17 | set(CMAKE_RANLIB "/Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-ranlib")
18 | set(CMAKE_LINKER "/Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-ld")
19 | set(CMAKE_COMPILER_IS_GNUCC )
20 | set(CMAKE_C_COMPILER_LOADED 1)
21 | set(CMAKE_C_COMPILER_WORKS TRUE)
22 | set(CMAKE_C_ABI_COMPILED TRUE)
23 | set(CMAKE_COMPILER_IS_MINGW )
24 | set(CMAKE_COMPILER_IS_CYGWIN )
25 | if(CMAKE_COMPILER_IS_CYGWIN)
26 | set(CYGWIN 1)
27 | set(UNIX 1)
28 | endif()
29 |
30 | set(CMAKE_C_COMPILER_ENV_VAR "CC")
31 |
32 | if(CMAKE_COMPILER_IS_MINGW)
33 | set(MINGW 1)
34 | endif()
35 | set(CMAKE_C_COMPILER_ID_RUN 1)
36 | set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m)
37 | set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC)
38 | set(CMAKE_C_LINKER_PREFERENCE 10)
39 |
40 | # Save compiler ABI information.
41 | set(CMAKE_C_SIZEOF_DATA_PTR "4")
42 | set(CMAKE_C_COMPILER_ABI "ELF")
43 | set(CMAKE_C_LIBRARY_ARCHITECTURE "")
44 |
45 | if(CMAKE_C_SIZEOF_DATA_PTR)
46 | set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}")
47 | endif()
48 |
49 | if(CMAKE_C_COMPILER_ABI)
50 | set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}")
51 | endif()
52 |
53 | if(CMAKE_C_LIBRARY_ARCHITECTURE)
54 | set(CMAKE_LIBRARY_ARCHITECTURE "")
55 | endif()
56 |
57 | set(CMAKE_C_CL_SHOWINCLUDES_PREFIX "")
58 | if(CMAKE_C_CL_SHOWINCLUDES_PREFIX)
59 | set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_C_CL_SHOWINCLUDES_PREFIX}")
60 | endif()
61 |
62 |
63 |
64 |
65 | set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "dl;c;dl")
66 | set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "/Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/lib/gcc/arm-linux-androideabi/4.9.x;/Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/arm-linux-androideabi/lib;/Users/guolei/Library/Android/sdk/ndk-bundle/platforms/android-19/arch-arm/usr/lib")
67 | set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "")
68 |
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/.externalNativeBuild/cmake/debug/armeabi/CMakeFiles/3.6.0-rc2/CMakeCXXCompiler.cmake:
--------------------------------------------------------------------------------
1 | set(CMAKE_CXX_COMPILER "/Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++")
2 | set(CMAKE_CXX_COMPILER_ARG1 "")
3 | set(CMAKE_CXX_COMPILER_ID "Clang")
4 | set(CMAKE_CXX_COMPILER_VERSION "")
5 | set(CMAKE_CXX_COMPILER_WRAPPER "")
6 | set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT "")
7 | set(CMAKE_CXX_COMPILE_FEATURES "")
8 | set(CMAKE_CXX98_COMPILE_FEATURES "")
9 | set(CMAKE_CXX11_COMPILE_FEATURES "")
10 | set(CMAKE_CXX14_COMPILE_FEATURES "")
11 |
12 | set(CMAKE_CXX_PLATFORM_ID "")
13 | set(CMAKE_CXX_SIMULATE_ID "")
14 | set(CMAKE_CXX_SIMULATE_VERSION "")
15 |
16 | set(CMAKE_AR "/Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-ar")
17 | set(CMAKE_RANLIB "/Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-ranlib")
18 | set(CMAKE_LINKER "/Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-ld")
19 | set(CMAKE_COMPILER_IS_GNUCXX )
20 | set(CMAKE_CXX_COMPILER_LOADED 1)
21 | set(CMAKE_CXX_COMPILER_WORKS TRUE)
22 | set(CMAKE_CXX_ABI_COMPILED TRUE)
23 | set(CMAKE_COMPILER_IS_MINGW )
24 | set(CMAKE_COMPILER_IS_CYGWIN )
25 | if(CMAKE_COMPILER_IS_CYGWIN)
26 | set(CYGWIN 1)
27 | set(UNIX 1)
28 | endif()
29 |
30 | set(CMAKE_CXX_COMPILER_ENV_VAR "CXX")
31 |
32 | if(CMAKE_COMPILER_IS_MINGW)
33 | set(MINGW 1)
34 | endif()
35 | set(CMAKE_CXX_COMPILER_ID_RUN 1)
36 | set(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC)
37 | set(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;mm;CPP)
38 | set(CMAKE_CXX_LINKER_PREFERENCE 30)
39 | set(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1)
40 |
41 | # Save compiler ABI information.
42 | set(CMAKE_CXX_SIZEOF_DATA_PTR "4")
43 | set(CMAKE_CXX_COMPILER_ABI "ELF")
44 | set(CMAKE_CXX_LIBRARY_ARCHITECTURE "")
45 |
46 | if(CMAKE_CXX_SIZEOF_DATA_PTR)
47 | set(CMAKE_SIZEOF_VOID_P "${CMAKE_CXX_SIZEOF_DATA_PTR}")
48 | endif()
49 |
50 | if(CMAKE_CXX_COMPILER_ABI)
51 | set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_CXX_COMPILER_ABI}")
52 | endif()
53 |
54 | if(CMAKE_CXX_LIBRARY_ARCHITECTURE)
55 | set(CMAKE_LIBRARY_ARCHITECTURE "")
56 | endif()
57 |
58 | set(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX "")
59 | if(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX)
60 | set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_CXX_CL_SHOWINCLUDES_PREFIX}")
61 | endif()
62 |
63 |
64 |
65 |
66 | set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "stdc++;m;dl;c;dl")
67 | set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "/Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/lib/gcc/arm-linux-androideabi/4.9.x;/Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/arm-linux-androideabi/lib;/Users/guolei/Library/Android/sdk/ndk-bundle/platforms/android-19/arch-arm/usr/lib")
68 | set(CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "")
69 |
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/.externalNativeBuild/cmake/debug/armeabi/CMakeFiles/3.6.0-rc2/CMakeDetermineCompilerABI_C.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/hotfix_about/hotfixdemo/.externalNativeBuild/cmake/debug/armeabi/CMakeFiles/3.6.0-rc2/CMakeDetermineCompilerABI_C.bin
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/.externalNativeBuild/cmake/debug/armeabi/CMakeFiles/3.6.0-rc2/CMakeDetermineCompilerABI_CXX.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/hotfix_about/hotfixdemo/.externalNativeBuild/cmake/debug/armeabi/CMakeFiles/3.6.0-rc2/CMakeDetermineCompilerABI_CXX.bin
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/.externalNativeBuild/cmake/debug/armeabi/CMakeFiles/3.6.0-rc2/CMakeSystem.cmake:
--------------------------------------------------------------------------------
1 | set(CMAKE_HOST_SYSTEM "Darwin-15.6.0")
2 | set(CMAKE_HOST_SYSTEM_NAME "Darwin")
3 | set(CMAKE_HOST_SYSTEM_VERSION "15.6.0")
4 | set(CMAKE_HOST_SYSTEM_PROCESSOR "x86_64")
5 |
6 | include("/Users/guolei/Library/Android/sdk/ndk-bundle/build/cmake/android.toolchain.cmake")
7 |
8 | set(CMAKE_SYSTEM "Android-19")
9 | set(CMAKE_SYSTEM_NAME "Android")
10 | set(CMAKE_SYSTEM_VERSION "19")
11 | set(CMAKE_SYSTEM_PROCESSOR "armv5te")
12 |
13 | set(CMAKE_CROSSCOMPILING "TRUE")
14 |
15 | set(CMAKE_SYSTEM_LOADED 1)
16 |
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/.externalNativeBuild/cmake/debug/armeabi/CMakeFiles/TargetDirectories.txt:
--------------------------------------------------------------------------------
1 | /Users/guolei/AndroidStudioProjects/Demo/hotfixdemo/.externalNativeBuild/cmake/debug/armeabi/CMakeFiles/edit_cache.dir
2 | /Users/guolei/AndroidStudioProjects/Demo/hotfixdemo/.externalNativeBuild/cmake/debug/armeabi/CMakeFiles/rebuild_cache.dir
3 | /Users/guolei/AndroidStudioProjects/Demo/hotfixdemo/.externalNativeBuild/cmake/debug/armeabi/CMakeFiles/native-lib.dir
4 |
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/.externalNativeBuild/cmake/debug/armeabi/CMakeFiles/cmake.check_cache:
--------------------------------------------------------------------------------
1 | # This file is generated by cmake for dependency checking of the CMakeCache.txt file
2 |
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/.externalNativeBuild/cmake/debug/armeabi/CMakeFiles/native-lib.dir/src/main/cpp/native-lib.cpp.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/hotfix_about/hotfixdemo/.externalNativeBuild/cmake/debug/armeabi/CMakeFiles/native-lib.dir/src/main/cpp/native-lib.cpp.o
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/.externalNativeBuild/cmake/debug/armeabi/android_gradle_build.json:
--------------------------------------------------------------------------------
1 |
2 | {
3 | "buildFiles" : [ "/Users/guolei/AndroidStudioProjects/Demo/hotfixdemo/CMakeLists.txt" ],
4 | "cleanCommands" :
5 | [
6 | "/Users/guolei/Library/Android/sdk/cmake/3.6.3155560/bin/cmake --build /Users/guolei/AndroidStudioProjects/Demo/hotfixdemo/.externalNativeBuild/cmake/debug/armeabi --target clean"
7 | ],
8 | "cppFileExtensions" : [ "cpp" ],
9 | "libraries" :
10 | {
11 | "native-lib-Debug-armeabi" :
12 | {
13 | "abi" : "armeabi",
14 | "artifactName" : "native-lib",
15 | "buildCommand" : "/Users/guolei/Library/Android/sdk/cmake/3.6.3155560/bin/cmake --build /Users/guolei/AndroidStudioProjects/Demo/hotfixdemo/.externalNativeBuild/cmake/debug/armeabi --target native-lib",
16 | "buildType" : "debug",
17 | "files" :
18 | [
19 |
20 | {
21 | "flags" : " -target armv5te-none-linux-androideabi -gcc-toolchain /Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64 --sysroot=/Users/guolei/Library/Android/sdk/ndk-bundle/platforms/android-19/arch-arm -Dnative_lib_EXPORTS -isystem /Users/guolei/Library/Android/sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include -isystem /Users/guolei/Library/Android/sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi/include -isystem /Users/guolei/Library/Android/sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include/backward -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -march=armv5te -mtune=xscale -msoft-float -fno-integrated-as -mthumb -Wa,--noexecstack -Wformat -Werror=format-security -fno-exceptions -fno-rtti -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -march=armv5te -mtune=xscale -msoft-float -fno-integrated-as -mthumb -Wa,--noexecstack -Wformat -Werror=format-security -fno-exceptions -fno-rtti -O0 -fno-limit-debug-info -O0 -fno-limit-debug-info -fPIC -c ",
22 | "src" : "/Users/guolei/AndroidStudioProjects/Demo/hotfixdemo/src/main/cpp/native-lib.cpp",
23 | "workingDirectory" : "/Users/guolei/AndroidStudioProjects/Demo/hotfixdemo/.externalNativeBuild/cmake/debug/armeabi"
24 | }
25 | ],
26 | "output" : "/Users/guolei/AndroidStudioProjects/Demo/hotfixdemo/build/intermediates/cmake/debug/obj/armeabi/libnative-lib.so",
27 | "toolchain" : "14328697835032828871"
28 | }
29 | },
30 | "toolchains" :
31 | {
32 | "14328697835032828871" :
33 | {
34 | "cCompilerExecutable" : "/Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang",
35 | "cppCompilerExecutable" : "/Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++"
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/.externalNativeBuild/cmake/debug/armeabi/cmake_build_command.txt:
--------------------------------------------------------------------------------
1 | Executable : /Users/guolei/Library/Android/sdk/cmake/3.6.3155560/bin/cmake
2 | arguments :
3 | -H/Users/guolei/AndroidStudioProjects/Demo/hotfixdemo
4 | -B/Users/guolei/AndroidStudioProjects/Demo/hotfixdemo/.externalNativeBuild/cmake/debug/armeabi
5 | -GAndroid Gradle - Ninja
6 | -DANDROID_ABI=armeabi
7 | -DANDROID_NDK=/Users/guolei/Library/Android/sdk/ndk-bundle
8 | -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/Users/guolei/AndroidStudioProjects/Demo/hotfixdemo/build/intermediates/cmake/debug/obj/armeabi
9 | -DCMAKE_BUILD_TYPE=Debug
10 | -DCMAKE_MAKE_PROGRAM=/Users/guolei/Library/Android/sdk/cmake/3.6.3155560/bin/ninja
11 | -DCMAKE_TOOLCHAIN_FILE=/Users/guolei/Library/Android/sdk/ndk-bundle/build/cmake/android.toolchain.cmake
12 | -DANDROID_PLATFORM=android-19
13 | -DCMAKE_CXX_FLAGS=
14 | jvmArgs :
15 |
16 |
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/.externalNativeBuild/cmake/debug/armeabi/cmake_build_output.txt:
--------------------------------------------------------------------------------
1 | -- Check for working C compiler: /Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang
2 | -- Check for working C compiler: /Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang -- works
3 | -- Detecting C compiler ABI info
4 | -- Detecting C compiler ABI info - done
5 | -- Detecting C compile features
6 | -- Detecting C compile features - done
7 | -- Check for working CXX compiler: /Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++
8 | -- Check for working CXX compiler: /Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ -- works
9 | -- Detecting CXX compiler ABI info
10 | -- Detecting CXX compiler ABI info - done
11 | -- Detecting CXX compile features
12 | -- Detecting CXX compile features - done
13 | -- Configuring done
14 | -- Generating done
15 | -- Build files have been written to: /Users/guolei/AndroidStudioProjects/Demo/hotfixdemo/.externalNativeBuild/cmake/debug/armeabi
16 |
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/.externalNativeBuild/cmake/debug/armeabi/cmake_install.cmake:
--------------------------------------------------------------------------------
1 | # Install script for directory: /Users/guolei/AndroidStudioProjects/Demo/hotfixdemo
2 |
3 | # Set the install prefix
4 | if(NOT DEFINED CMAKE_INSTALL_PREFIX)
5 | set(CMAKE_INSTALL_PREFIX "/usr/local")
6 | endif()
7 | string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
8 |
9 | # Set the install configuration name.
10 | if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
11 | if(BUILD_TYPE)
12 | string(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
13 | CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
14 | else()
15 | set(CMAKE_INSTALL_CONFIG_NAME "Debug")
16 | endif()
17 | message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
18 | endif()
19 |
20 | # Set the component getting installed.
21 | if(NOT CMAKE_INSTALL_COMPONENT)
22 | if(COMPONENT)
23 | message(STATUS "Install component: \"${COMPONENT}\"")
24 | set(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
25 | else()
26 | set(CMAKE_INSTALL_COMPONENT)
27 | endif()
28 | endif()
29 |
30 | # Install shared libraries without execute permission?
31 | if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE)
32 | set(CMAKE_INSTALL_SO_NO_EXE "0")
33 | endif()
34 |
35 | if(CMAKE_INSTALL_COMPONENT)
36 | set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt")
37 | else()
38 | set(CMAKE_INSTALL_MANIFEST "install_manifest.txt")
39 | endif()
40 |
41 | string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT
42 | "${CMAKE_INSTALL_MANIFEST_FILES}")
43 | file(WRITE "/Users/guolei/AndroidStudioProjects/Demo/hotfixdemo/.externalNativeBuild/cmake/debug/armeabi/${CMAKE_INSTALL_MANIFEST}"
44 | "${CMAKE_INSTALL_MANIFEST_CONTENT}")
45 |
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/.externalNativeBuild/cmake/debug/armeabi/rules.ninja:
--------------------------------------------------------------------------------
1 | # CMAKE generated file: DO NOT EDIT!
2 | # Generated by "Ninja" Generator, CMake Version 3.6
3 |
4 | # This file contains all the rules used to get the outputs files
5 | # built from the input files.
6 | # It is included in the main 'build.ninja'.
7 |
8 | # =============================================================================
9 | # Project: Project
10 | # Configuration: Debug
11 | # =============================================================================
12 | # =============================================================================
13 |
14 | #############################################
15 | # Rule for running custom commands.
16 |
17 | rule CUSTOM_COMMAND
18 | command = $COMMAND
19 | description = $DESC
20 |
21 |
22 | #############################################
23 | # Rule for compiling CXX files.
24 |
25 | rule CXX_COMPILER__native-lib
26 | depfile = $DEP_FILE
27 | deps = gcc
28 | command = /Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ -target armv5te-none-linux-androideabi -gcc-toolchain /Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64 --sysroot=/Users/guolei/Library/Android/sdk/ndk-bundle/platforms/android-19/arch-arm $DEFINES $INCLUDES $FLAGS -MD -MT $out -MF $DEP_FILE -o $out -c $IN_ABS
29 | description = Building CXX object $out
30 |
31 |
32 | #############################################
33 | # Rule for linking CXX shared library.
34 |
35 | rule CXX_SHARED_LIBRARY_LINKER__native-lib
36 | command = $PRE_LINK && /Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ -target armv5te-none-linux-androideabi -gcc-toolchain /Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64 --sysroot=/Users/guolei/Library/Android/sdk/ndk-bundle/platforms/android-19/arch-arm -fPIC $LANGUAGE_COMPILE_FLAGS $ARCH_FLAGS $LINK_FLAGS -shared $SONAME_FLAG$SONAME -o $TARGET_FILE $in $LINK_PATH $LINK_LIBRARIES && $POST_BUILD
37 | description = Linking CXX shared library $TARGET_FILE
38 | restat = $RESTAT
39 |
40 |
41 | #############################################
42 | # Rule for re-running cmake.
43 |
44 | rule RERUN_CMAKE
45 | command = /Users/guolei/Library/Android/sdk/cmake/3.6.3155560/bin/cmake -H/Users/guolei/AndroidStudioProjects/Demo/hotfixdemo -B/Users/guolei/AndroidStudioProjects/Demo/hotfixdemo/.externalNativeBuild/cmake/debug/armeabi
46 | description = Re-running CMake...
47 | generator = 1
48 |
49 |
50 | #############################################
51 | # Rule for cleaning all built files.
52 |
53 | rule CLEAN
54 | command = /Users/guolei/Library/Android/sdk/cmake/3.6.3155560/bin/ninja -t clean
55 | description = Cleaning all built files...
56 |
57 |
58 | #############################################
59 | # Rule for printing all primary targets available.
60 |
61 | rule HELP
62 | command = /Users/guolei/Library/Android/sdk/cmake/3.6.3155560/bin/ninja -t targets
63 | description = All primary targets available:
64 |
65 |
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/.externalNativeBuild/cmake/release/armeabi/CMakeFiles/3.6.0-rc2/CMakeCCompiler.cmake:
--------------------------------------------------------------------------------
1 | set(CMAKE_C_COMPILER "/Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang")
2 | set(CMAKE_C_COMPILER_ARG1 "")
3 | set(CMAKE_C_COMPILER_ID "Clang")
4 | set(CMAKE_C_COMPILER_VERSION "")
5 | set(CMAKE_C_COMPILER_WRAPPER "")
6 | set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "")
7 | set(CMAKE_C_COMPILE_FEATURES "")
8 | set(CMAKE_C90_COMPILE_FEATURES "")
9 | set(CMAKE_C99_COMPILE_FEATURES "")
10 | set(CMAKE_C11_COMPILE_FEATURES "")
11 |
12 | set(CMAKE_C_PLATFORM_ID "")
13 | set(CMAKE_C_SIMULATE_ID "")
14 | set(CMAKE_C_SIMULATE_VERSION "")
15 |
16 | set(CMAKE_AR "/Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-ar")
17 | set(CMAKE_RANLIB "/Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-ranlib")
18 | set(CMAKE_LINKER "/Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-ld")
19 | set(CMAKE_COMPILER_IS_GNUCC )
20 | set(CMAKE_C_COMPILER_LOADED 1)
21 | set(CMAKE_C_COMPILER_WORKS TRUE)
22 | set(CMAKE_C_ABI_COMPILED TRUE)
23 | set(CMAKE_COMPILER_IS_MINGW )
24 | set(CMAKE_COMPILER_IS_CYGWIN )
25 | if(CMAKE_COMPILER_IS_CYGWIN)
26 | set(CYGWIN 1)
27 | set(UNIX 1)
28 | endif()
29 |
30 | set(CMAKE_C_COMPILER_ENV_VAR "CC")
31 |
32 | if(CMAKE_COMPILER_IS_MINGW)
33 | set(MINGW 1)
34 | endif()
35 | set(CMAKE_C_COMPILER_ID_RUN 1)
36 | set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m)
37 | set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC)
38 | set(CMAKE_C_LINKER_PREFERENCE 10)
39 |
40 | # Save compiler ABI information.
41 | set(CMAKE_C_SIZEOF_DATA_PTR "4")
42 | set(CMAKE_C_COMPILER_ABI "ELF")
43 | set(CMAKE_C_LIBRARY_ARCHITECTURE "")
44 |
45 | if(CMAKE_C_SIZEOF_DATA_PTR)
46 | set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}")
47 | endif()
48 |
49 | if(CMAKE_C_COMPILER_ABI)
50 | set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}")
51 | endif()
52 |
53 | if(CMAKE_C_LIBRARY_ARCHITECTURE)
54 | set(CMAKE_LIBRARY_ARCHITECTURE "")
55 | endif()
56 |
57 | set(CMAKE_C_CL_SHOWINCLUDES_PREFIX "")
58 | if(CMAKE_C_CL_SHOWINCLUDES_PREFIX)
59 | set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_C_CL_SHOWINCLUDES_PREFIX}")
60 | endif()
61 |
62 |
63 |
64 |
65 | set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "dl;c;dl")
66 | set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "/Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/lib/gcc/arm-linux-androideabi/4.9.x;/Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/arm-linux-androideabi/lib;/Users/guolei/Library/Android/sdk/ndk-bundle/platforms/android-19/arch-arm/usr/lib")
67 | set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "")
68 |
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/.externalNativeBuild/cmake/release/armeabi/CMakeFiles/3.6.0-rc2/CMakeCXXCompiler.cmake:
--------------------------------------------------------------------------------
1 | set(CMAKE_CXX_COMPILER "/Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++")
2 | set(CMAKE_CXX_COMPILER_ARG1 "")
3 | set(CMAKE_CXX_COMPILER_ID "Clang")
4 | set(CMAKE_CXX_COMPILER_VERSION "")
5 | set(CMAKE_CXX_COMPILER_WRAPPER "")
6 | set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT "")
7 | set(CMAKE_CXX_COMPILE_FEATURES "")
8 | set(CMAKE_CXX98_COMPILE_FEATURES "")
9 | set(CMAKE_CXX11_COMPILE_FEATURES "")
10 | set(CMAKE_CXX14_COMPILE_FEATURES "")
11 |
12 | set(CMAKE_CXX_PLATFORM_ID "")
13 | set(CMAKE_CXX_SIMULATE_ID "")
14 | set(CMAKE_CXX_SIMULATE_VERSION "")
15 |
16 | set(CMAKE_AR "/Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-ar")
17 | set(CMAKE_RANLIB "/Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-ranlib")
18 | set(CMAKE_LINKER "/Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-ld")
19 | set(CMAKE_COMPILER_IS_GNUCXX )
20 | set(CMAKE_CXX_COMPILER_LOADED 1)
21 | set(CMAKE_CXX_COMPILER_WORKS TRUE)
22 | set(CMAKE_CXX_ABI_COMPILED TRUE)
23 | set(CMAKE_COMPILER_IS_MINGW )
24 | set(CMAKE_COMPILER_IS_CYGWIN )
25 | if(CMAKE_COMPILER_IS_CYGWIN)
26 | set(CYGWIN 1)
27 | set(UNIX 1)
28 | endif()
29 |
30 | set(CMAKE_CXX_COMPILER_ENV_VAR "CXX")
31 |
32 | if(CMAKE_COMPILER_IS_MINGW)
33 | set(MINGW 1)
34 | endif()
35 | set(CMAKE_CXX_COMPILER_ID_RUN 1)
36 | set(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC)
37 | set(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;mm;CPP)
38 | set(CMAKE_CXX_LINKER_PREFERENCE 30)
39 | set(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1)
40 |
41 | # Save compiler ABI information.
42 | set(CMAKE_CXX_SIZEOF_DATA_PTR "4")
43 | set(CMAKE_CXX_COMPILER_ABI "ELF")
44 | set(CMAKE_CXX_LIBRARY_ARCHITECTURE "")
45 |
46 | if(CMAKE_CXX_SIZEOF_DATA_PTR)
47 | set(CMAKE_SIZEOF_VOID_P "${CMAKE_CXX_SIZEOF_DATA_PTR}")
48 | endif()
49 |
50 | if(CMAKE_CXX_COMPILER_ABI)
51 | set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_CXX_COMPILER_ABI}")
52 | endif()
53 |
54 | if(CMAKE_CXX_LIBRARY_ARCHITECTURE)
55 | set(CMAKE_LIBRARY_ARCHITECTURE "")
56 | endif()
57 |
58 | set(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX "")
59 | if(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX)
60 | set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_CXX_CL_SHOWINCLUDES_PREFIX}")
61 | endif()
62 |
63 |
64 |
65 |
66 | set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "stdc++;m;dl;c;dl")
67 | set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "/Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/lib/gcc/arm-linux-androideabi/4.9.x;/Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/arm-linux-androideabi/lib;/Users/guolei/Library/Android/sdk/ndk-bundle/platforms/android-19/arch-arm/usr/lib")
68 | set(CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "")
69 |
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/.externalNativeBuild/cmake/release/armeabi/CMakeFiles/3.6.0-rc2/CMakeDetermineCompilerABI_C.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/hotfix_about/hotfixdemo/.externalNativeBuild/cmake/release/armeabi/CMakeFiles/3.6.0-rc2/CMakeDetermineCompilerABI_C.bin
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/.externalNativeBuild/cmake/release/armeabi/CMakeFiles/3.6.0-rc2/CMakeDetermineCompilerABI_CXX.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/hotfix_about/hotfixdemo/.externalNativeBuild/cmake/release/armeabi/CMakeFiles/3.6.0-rc2/CMakeDetermineCompilerABI_CXX.bin
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/.externalNativeBuild/cmake/release/armeabi/CMakeFiles/3.6.0-rc2/CMakeSystem.cmake:
--------------------------------------------------------------------------------
1 | set(CMAKE_HOST_SYSTEM "Darwin-15.6.0")
2 | set(CMAKE_HOST_SYSTEM_NAME "Darwin")
3 | set(CMAKE_HOST_SYSTEM_VERSION "15.6.0")
4 | set(CMAKE_HOST_SYSTEM_PROCESSOR "x86_64")
5 |
6 | include("/Users/guolei/Library/Android/sdk/ndk-bundle/build/cmake/android.toolchain.cmake")
7 |
8 | set(CMAKE_SYSTEM "Android-19")
9 | set(CMAKE_SYSTEM_NAME "Android")
10 | set(CMAKE_SYSTEM_VERSION "19")
11 | set(CMAKE_SYSTEM_PROCESSOR "armv5te")
12 |
13 | set(CMAKE_CROSSCOMPILING "TRUE")
14 |
15 | set(CMAKE_SYSTEM_LOADED 1)
16 |
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/.externalNativeBuild/cmake/release/armeabi/CMakeFiles/TargetDirectories.txt:
--------------------------------------------------------------------------------
1 | /Users/guolei/AndroidStudioProjects/Demo/hotfixdemo/.externalNativeBuild/cmake/release/armeabi/CMakeFiles/edit_cache.dir
2 | /Users/guolei/AndroidStudioProjects/Demo/hotfixdemo/.externalNativeBuild/cmake/release/armeabi/CMakeFiles/rebuild_cache.dir
3 | /Users/guolei/AndroidStudioProjects/Demo/hotfixdemo/.externalNativeBuild/cmake/release/armeabi/CMakeFiles/native-lib.dir
4 |
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/.externalNativeBuild/cmake/release/armeabi/CMakeFiles/cmake.check_cache:
--------------------------------------------------------------------------------
1 | # This file is generated by cmake for dependency checking of the CMakeCache.txt file
2 |
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/.externalNativeBuild/cmake/release/armeabi/android_gradle_build.json:
--------------------------------------------------------------------------------
1 |
2 | {
3 | "buildFiles" : [ "/Users/guolei/AndroidStudioProjects/Demo/hotfixdemo/CMakeLists.txt" ],
4 | "cleanCommands" :
5 | [
6 | "/Users/guolei/Library/Android/sdk/cmake/3.6.3155560/bin/cmake --build /Users/guolei/AndroidStudioProjects/Demo/hotfixdemo/.externalNativeBuild/cmake/release/armeabi --target clean"
7 | ],
8 | "cppFileExtensions" : [ "cpp" ],
9 | "libraries" :
10 | {
11 | "native-lib-Release-armeabi" :
12 | {
13 | "abi" : "armeabi",
14 | "artifactName" : "native-lib",
15 | "buildCommand" : "/Users/guolei/Library/Android/sdk/cmake/3.6.3155560/bin/cmake --build /Users/guolei/AndroidStudioProjects/Demo/hotfixdemo/.externalNativeBuild/cmake/release/armeabi --target native-lib",
16 | "buildType" : "release",
17 | "files" :
18 | [
19 |
20 | {
21 | "flags" : " -target armv5te-none-linux-androideabi -gcc-toolchain /Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64 --sysroot=/Users/guolei/Library/Android/sdk/ndk-bundle/platforms/android-19/arch-arm -Dnative_lib_EXPORTS -isystem /Users/guolei/Library/Android/sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include -isystem /Users/guolei/Library/Android/sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi/include -isystem /Users/guolei/Library/Android/sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include/backward -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -march=armv5te -mtune=xscale -msoft-float -fno-integrated-as -mthumb -Wa,--noexecstack -Wformat -Werror=format-security -fno-exceptions -fno-rtti -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -march=armv5te -mtune=xscale -msoft-float -fno-integrated-as -mthumb -Wa,--noexecstack -Wformat -Werror=format-security -fno-exceptions -fno-rtti -Os -DNDEBUG -Os -DNDEBUG -fPIC -c ",
22 | "src" : "/Users/guolei/AndroidStudioProjects/Demo/hotfixdemo/src/main/cpp/native-lib.cpp",
23 | "workingDirectory" : "/Users/guolei/AndroidStudioProjects/Demo/hotfixdemo/.externalNativeBuild/cmake/release/armeabi"
24 | }
25 | ],
26 | "output" : "/Users/guolei/AndroidStudioProjects/Demo/hotfixdemo/build/intermediates/cmake/release/obj/armeabi/libnative-lib.so",
27 | "toolchain" : "14328697835032828871"
28 | }
29 | },
30 | "toolchains" :
31 | {
32 | "14328697835032828871" :
33 | {
34 | "cCompilerExecutable" : "/Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang",
35 | "cppCompilerExecutable" : "/Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++"
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/.externalNativeBuild/cmake/release/armeabi/cmake_build_command.txt:
--------------------------------------------------------------------------------
1 | Executable : /Users/guolei/Library/Android/sdk/cmake/3.6.3155560/bin/cmake
2 | arguments :
3 | -H/Users/guolei/AndroidStudioProjects/Demo/hotfixdemo
4 | -B/Users/guolei/AndroidStudioProjects/Demo/hotfixdemo/.externalNativeBuild/cmake/release/armeabi
5 | -GAndroid Gradle - Ninja
6 | -DANDROID_ABI=armeabi
7 | -DANDROID_NDK=/Users/guolei/Library/Android/sdk/ndk-bundle
8 | -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/Users/guolei/AndroidStudioProjects/Demo/hotfixdemo/build/intermediates/cmake/release/obj/armeabi
9 | -DCMAKE_BUILD_TYPE=Release
10 | -DCMAKE_MAKE_PROGRAM=/Users/guolei/Library/Android/sdk/cmake/3.6.3155560/bin/ninja
11 | -DCMAKE_TOOLCHAIN_FILE=/Users/guolei/Library/Android/sdk/ndk-bundle/build/cmake/android.toolchain.cmake
12 | -DANDROID_PLATFORM=android-19
13 | -DCMAKE_CXX_FLAGS=
14 | jvmArgs :
15 |
16 |
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/.externalNativeBuild/cmake/release/armeabi/cmake_build_output.txt:
--------------------------------------------------------------------------------
1 | -- Check for working C compiler: /Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang
2 | -- Check for working C compiler: /Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang -- works
3 | -- Detecting C compiler ABI info
4 | -- Detecting C compiler ABI info - done
5 | -- Detecting C compile features
6 | -- Detecting C compile features - done
7 | -- Check for working CXX compiler: /Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++
8 | -- Check for working CXX compiler: /Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ -- works
9 | -- Detecting CXX compiler ABI info
10 | -- Detecting CXX compiler ABI info - done
11 | -- Detecting CXX compile features
12 | -- Detecting CXX compile features - done
13 | -- Configuring done
14 | -- Generating done
15 | -- Build files have been written to: /Users/guolei/AndroidStudioProjects/Demo/hotfixdemo/.externalNativeBuild/cmake/release/armeabi
16 |
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/.externalNativeBuild/cmake/release/armeabi/cmake_install.cmake:
--------------------------------------------------------------------------------
1 | # Install script for directory: /Users/guolei/AndroidStudioProjects/Demo/hotfixdemo
2 |
3 | # Set the install prefix
4 | if(NOT DEFINED CMAKE_INSTALL_PREFIX)
5 | set(CMAKE_INSTALL_PREFIX "/usr/local")
6 | endif()
7 | string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
8 |
9 | # Set the install configuration name.
10 | if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
11 | if(BUILD_TYPE)
12 | string(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
13 | CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
14 | else()
15 | set(CMAKE_INSTALL_CONFIG_NAME "Release")
16 | endif()
17 | message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
18 | endif()
19 |
20 | # Set the component getting installed.
21 | if(NOT CMAKE_INSTALL_COMPONENT)
22 | if(COMPONENT)
23 | message(STATUS "Install component: \"${COMPONENT}\"")
24 | set(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
25 | else()
26 | set(CMAKE_INSTALL_COMPONENT)
27 | endif()
28 | endif()
29 |
30 | # Install shared libraries without execute permission?
31 | if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE)
32 | set(CMAKE_INSTALL_SO_NO_EXE "0")
33 | endif()
34 |
35 | if(CMAKE_INSTALL_COMPONENT)
36 | set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt")
37 | else()
38 | set(CMAKE_INSTALL_MANIFEST "install_manifest.txt")
39 | endif()
40 |
41 | string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT
42 | "${CMAKE_INSTALL_MANIFEST_FILES}")
43 | file(WRITE "/Users/guolei/AndroidStudioProjects/Demo/hotfixdemo/.externalNativeBuild/cmake/release/armeabi/${CMAKE_INSTALL_MANIFEST}"
44 | "${CMAKE_INSTALL_MANIFEST_CONTENT}")
45 |
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/.externalNativeBuild/cmake/release/armeabi/rules.ninja:
--------------------------------------------------------------------------------
1 | # CMAKE generated file: DO NOT EDIT!
2 | # Generated by "Ninja" Generator, CMake Version 3.6
3 |
4 | # This file contains all the rules used to get the outputs files
5 | # built from the input files.
6 | # It is included in the main 'build.ninja'.
7 |
8 | # =============================================================================
9 | # Project: Project
10 | # Configuration: Release
11 | # =============================================================================
12 | # =============================================================================
13 |
14 | #############################################
15 | # Rule for running custom commands.
16 |
17 | rule CUSTOM_COMMAND
18 | command = $COMMAND
19 | description = $DESC
20 |
21 |
22 | #############################################
23 | # Rule for compiling CXX files.
24 |
25 | rule CXX_COMPILER__native-lib
26 | depfile = $DEP_FILE
27 | deps = gcc
28 | command = /Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ -target armv5te-none-linux-androideabi -gcc-toolchain /Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64 --sysroot=/Users/guolei/Library/Android/sdk/ndk-bundle/platforms/android-19/arch-arm $DEFINES $INCLUDES $FLAGS -MD -MT $out -MF $DEP_FILE -o $out -c $IN_ABS
29 | description = Building CXX object $out
30 |
31 |
32 | #############################################
33 | # Rule for linking CXX shared library.
34 |
35 | rule CXX_SHARED_LIBRARY_LINKER__native-lib
36 | command = $PRE_LINK && /Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ -target armv5te-none-linux-androideabi -gcc-toolchain /Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64 --sysroot=/Users/guolei/Library/Android/sdk/ndk-bundle/platforms/android-19/arch-arm -fPIC $LANGUAGE_COMPILE_FLAGS $ARCH_FLAGS $LINK_FLAGS -shared $SONAME_FLAG$SONAME -o $TARGET_FILE $in $LINK_PATH $LINK_LIBRARIES && $POST_BUILD
37 | description = Linking CXX shared library $TARGET_FILE
38 | restat = $RESTAT
39 |
40 |
41 | #############################################
42 | # Rule for re-running cmake.
43 |
44 | rule RERUN_CMAKE
45 | command = /Users/guolei/Library/Android/sdk/cmake/3.6.3155560/bin/cmake -H/Users/guolei/AndroidStudioProjects/Demo/hotfixdemo -B/Users/guolei/AndroidStudioProjects/Demo/hotfixdemo/.externalNativeBuild/cmake/release/armeabi
46 | description = Re-running CMake...
47 | generator = 1
48 |
49 |
50 | #############################################
51 | # Rule for cleaning all built files.
52 |
53 | rule CLEAN
54 | command = /Users/guolei/Library/Android/sdk/cmake/3.6.3155560/bin/ninja -t clean
55 | description = Cleaning all built files...
56 |
57 |
58 | #############################################
59 | # Rule for printing all primary targets available.
60 |
61 | rule HELP
62 | command = /Users/guolei/Library/Android/sdk/cmake/3.6.3155560/bin/ninja -t targets
63 | description = All primary targets available:
64 |
65 |
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # For more information about using CMake with Android Studio, read the
2 | # documentation: https://d.android.com/studio/projects/add-native-code.html
3 |
4 | # Sets the minimum version of CMake required to build the native library.
5 |
6 | cmake_minimum_required(VERSION 3.4.1)
7 |
8 |
9 | # Creates and names a library, sets it as either STATIC
10 | # or SHARED, and provides the relative paths to its source code.
11 | # You can define multiple libraries, and CMake builds them for you.
12 | # Gradle automatically packages shared libraries with your APK.
13 |
14 | add_library( # Sets the name of the library.
15 | native-lib
16 |
17 | # Sets the library as a shared library.
18 | SHARED
19 |
20 | # Provides a relative path to your source file(s).
21 | src/main/cpp/native-lib.cpp
22 | )
23 |
24 | # Searches for a specified prebuilt library and stores the path as a
25 | # variable. Because CMake includes system libraries in the search path by
26 | # default, you only need to specify the name of the public NDK library
27 | # you want to add. CMake verifies that the library exists before
28 | # completing its build.
29 |
30 | find_library( # Sets the name of the path variable.
31 | log-lib
32 |
33 | # Specifies the name of the NDK library that
34 | # you want CMake to locate.
35 | log )
36 |
37 | # Specifies libraries CMake should link to your target library. You
38 | # can link multiple libraries, such as libraries you define in this
39 | # build script, prebuilt third-party libraries, or system libraries.
40 |
41 | target_link_libraries( # Specifies the target library.
42 | native-lib
43 |
44 | # Links the target library to the log library
45 | # included in the NDK.
46 | ${log-lib}
47 | )
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 26
5 | buildToolsVersion "26.0.2"
6 |
7 |
8 | defaultConfig {
9 | applicationId "com.guolei.hotfixdemo"
10 | minSdkVersion 19
11 | targetSdkVersion 26
12 | versionCode 1
13 | versionName "1.0"
14 |
15 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
16 | externalNativeBuild {
17 | cmake {
18 | cppFlags ""
19 | }
20 | }
21 | ndk {
22 | abiFilters 'armeabi'
23 | }
24 | }
25 |
26 | buildTypes {
27 | release {
28 | minifyEnabled false
29 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
30 | }
31 | }
32 |
33 |
34 | externalNativeBuild {
35 | cmake {
36 | path "CMakeLists.txt"
37 | }
38 | }
39 | }
40 |
41 | dependencies {
42 | compile fileTree(dir: 'libs', include: ['*.jar'])
43 | compile 'com.android.support:appcompat-v7:26.1.0'
44 | compile 'com.android.support.constraint:constraint-layout:1.0.2'
45 | testCompile 'junit:junit:4.12'
46 | androidTestCompile('com.android.support.test.espresso:espresso-core:3.0.1', {
47 | exclude group: 'com.android.support', module: 'support-annotations'
48 | })
49 | }
50 |
51 | apply plugin: 'patch-gradle-plugin'
52 | patchPlugin{
53 | enable = true//如果enable为true则表明打出的包会在每个类的构造函数中注入代码
54 | }
55 |
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/src/androidTest/java/com/guolei/hotfixdemo/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.guolei.hotfixdemo;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumented test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() throws Exception {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.guolei.hotfixdemo", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/src/main/cpp/native-lib.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 |
4 |
5 | extern "C"
6 | JNIEXPORT jstring
7 | JNICALL
8 | Java_com_guolei_hotfixdemo_MainActivity_stringFromJNI(
9 | JNIEnv *env,
10 | jobject /* this */) {
11 | std::string hello = "Hello from so";
12 | return env->NewStringUTF(hello.c_str());
13 | }
14 |
15 | extern "C"
16 | JNIEXPORT void JNICALL
17 | Java_com_guolei_hotfixdemo_MainActivity_replace(JNIEnv *env,
18 | jobject instance,
19 | jlong src,
20 | jlong des,
21 | jint size) {
22 |
23 | memcpy((void*)src, (void*)des, (size_t) size);
24 |
25 | }
26 |
27 |
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/src/main/java/com/guolei/hotfixdemo/Log.java:
--------------------------------------------------------------------------------
1 | package com.guolei.hotfixdemo;
2 |
3 | // _ _ _ _
4 | //__ _____ _ __| | _| |_(_) | ___
5 | //\ \ /\ / / _ \| '__| |/ / __| | |/ _ \
6 | // \ V V / (_) | | | <| |_| | | __/
7 | // \_/\_/ \___/|_| |_|\_\\__|_|_|\___|
8 |
9 |
10 | /**
11 | * Copyright © 2013-2017 Worktile. All Rights Reserved.
12 | * Author: guolei
13 | * Email: 1120832563@qq.com
14 | * Date: 18/4/4
15 | * Time: 下午2:42
16 | * Desc:
17 | */
18 | public class Log {
19 |
20 | public void log(){
21 | android.util.Log.e("hotfix", "log: " );
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/src/main/java/com/guolei/hotfixdemo/LogFix.java:
--------------------------------------------------------------------------------
1 | package com.guolei.hotfixdemo;
2 |
3 | // _ _ _ _
4 | //__ _____ _ __| | _| |_(_) | ___
5 | //\ \ /\ / / _ \| '__| |/ / __| | |/ _ \
6 | // \ V V / (_) | | | <| |_| | | __/
7 | // \_/\_/ \___/|_| |_|\_\\__|_|_|\___|
8 |
9 |
10 | /**
11 | * Copyright © 2013-2017 Worktile. All Rights Reserved.
12 | * Author: guolei
13 | * Email: 1120832563@qq.com
14 | * Date: 18/4/4
15 | * Time: 下午2:43
16 | * Desc:
17 | */
18 | public class LogFix {
19 | public void log(){
20 | android.util.Log.e("hotfix", "log: fix fix fix " );
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/src/main/java/com/guolei/hotfixdemo/MethodSizeCase.java:
--------------------------------------------------------------------------------
1 | package com.guolei.hotfixdemo;
2 |
3 | // _ _ _ _
4 | //__ _____ _ __| | _| |_(_) | ___
5 | //\ \ /\ / / _ \| '__| |/ / __| | |/ _ \
6 | // \ V V / (_) | | | <| |_| | | __/
7 | // \_/\_/ \___/|_| |_|\_\\__|_|_|\___|
8 |
9 |
10 | /**
11 | * Copyright © 2013-2017 Worktile. All Rights Reserved.
12 | * Author: guolei
13 | * Email: 1120832563@qq.com
14 | * Date: 18/4/4
15 | * Time: 下午2:29
16 | * Desc:
17 | */
18 | public class MethodSizeCase {
19 | public void method_1() {
20 |
21 | }
22 |
23 | public void method_2() {
24 |
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/src/main/java/com/guolei/hotfixdemo/MyApplication.java:
--------------------------------------------------------------------------------
1 | package com.guolei.hotfixdemo;
2 |
3 | import android.app.Application;
4 | import android.content.Context;
5 |
6 |
7 | // _ _ _ _
8 | //__ _____ _ __| | _| |_(_) | ___
9 | //\ \ /\ / / _ \| '__| |/ / __| | |/ _ \
10 | // \ V V / (_) | | | <| |_| | | __/
11 | // \_/\_/ \___/|_| |_|\_\\__|_|_|\___|
12 |
13 |
14 | /**
15 | * Copyright © 2013-2017 Worktile. All Rights Reserved.
16 | * Author: guolei
17 | * Email: 1120832563@qq.com
18 | * Date: 18/4/2
19 | * Time: 上午10:30
20 | * Desc:
21 | */
22 | public class MyApplication extends Application {
23 |
24 | @Override
25 | public void onCreate() {
26 | super.onCreate();
27 | }
28 |
29 | @Override
30 | protected void attachBaseContext(Context base) {
31 | super.attachBaseContext(base);
32 | if (getSharedPreferences("hotfix", 0).getBoolean("enable_so", false)) {
33 | PatchSo.pathSo(base,"/sdcard/so_fix.apk");
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/src/main/java/com/guolei/hotfixdemo/User.java:
--------------------------------------------------------------------------------
1 | package com.guolei.hotfixdemo;
2 |
3 | // _ _ _ _
4 | //__ _____ _ __| | _| |_(_) | ___
5 | //\ \ /\ / / _ \| '__| |/ / __| | |/ _ \
6 | // \ V V / (_) | | | <| |_| | | __/
7 | // \_/\_/ \___/|_| |_|\_\\__|_|_|\___|
8 |
9 |
10 | import java.util.Locale;
11 |
12 | /**
13 | * Copyright © 2013-2017 Worktile. All Rights Reserved.
14 | * Author: guolei
15 | * Email: 1120832563@qq.com
16 | * Date: 18/4/2
17 | * Time: 上午11:02
18 | * Desc:
19 | */
20 | public class User {
21 |
22 | private String mUserName;
23 | private int mAge;
24 |
25 | public User(String userName, int age) {
26 | mUserName = userName;
27 | mAge = age;
28 | }
29 |
30 | @Override
31 | public String toString() {
32 | return String.format(Locale.getDefault(), "origin:[username:%s,age:%d]", mUserName, mAge);
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/src/main/java/com/tmall/wireless/jandfix/Constants.java:
--------------------------------------------------------------------------------
1 | package com.tmall.wireless.jandfix;
2 |
3 | /**
4 | * Created by jingchaoqinjc on 17/5/18.
5 | */
6 |
7 | public interface Constants {
8 |
9 | int INVALID_SIZE = -1;
10 | }
11 |
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/src/main/java/com/tmall/wireless/jandfix/IMethodReplace.java:
--------------------------------------------------------------------------------
1 | package com.tmall.wireless.jandfix;
2 |
3 | import java.lang.reflect.Method;
4 |
5 | /**
6 | * Created by jingchaoqinjc on 17/5/15.
7 | */
8 |
9 | public interface IMethodReplace {
10 |
11 | public void replace(Method src, Method dest);
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/src/main/java/com/tmall/wireless/jandfix/IMethodSize.java:
--------------------------------------------------------------------------------
1 | package com.tmall.wireless.jandfix;
2 |
3 | /**
4 | * Created by jingchaoqinjc on 17/5/16.
5 | */
6 |
7 | public interface IMethodSize {
8 |
9 | int methodSize() throws Exception;
10 |
11 | int methodIndexOffset() throws Exception;
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/src/main/java/com/tmall/wireless/jandfix/MethodReplace5_0.java:
--------------------------------------------------------------------------------
1 | package com.tmall.wireless.jandfix;
2 |
3 |
4 | import java.lang.reflect.Field;
5 | import java.lang.reflect.Method;
6 | import java.lang.reflect.Modifier;
7 |
8 | /**
9 | * Created by jingchaoqinjc on 17/5/15.
10 | */
11 |
12 | public class MethodReplace5_0 implements IMethodReplace {
13 |
14 |
15 | static Field artMethodField;
16 |
17 | static {
18 | try {
19 | Class absMethodClass = Class.forName("java.lang.reflect.AbstractMethod");
20 | artMethodField = absMethodClass.getDeclaredField("artMethod");
21 | artMethodField.setAccessible(true);
22 | } catch (Exception e) {
23 | e.printStackTrace();
24 | }
25 | }
26 |
27 | @Override
28 | public void replace(Method src, Method dest) {
29 | try {
30 | Object o1 = artMethodField.get(src);
31 | Object o2 = artMethodField.get(dest);
32 | replaceReal(o1, o2);
33 | } catch (Exception e) {
34 | e.printStackTrace();
35 | }
36 | }
37 |
38 | private void replaceReal(Object src, Object dest) {
39 | Class c = src.getClass();
40 | try {
41 | while (c != Object.class) {
42 | for (Field f : c.getDeclaredFields()) {
43 | f.setAccessible(true);
44 | if ((f.getModifiers() & Modifier.STATIC) == 0) {
45 | if (!f.getName().equals("declaringClass") && !f.getName().equals("methodIndex"))
46 | f.set(src, f.get(dest));
47 | }
48 | }
49 | c = c.getSuperclass();
50 | }
51 | } catch (Exception e) {
52 | e.printStackTrace();
53 | }
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/src/main/java/com/tmall/wireless/jandfix/MethodReplace5_1.java:
--------------------------------------------------------------------------------
1 | package com.tmall.wireless.jandfix;
2 |
3 | import java.lang.reflect.Field;
4 | import java.lang.reflect.Method;
5 |
6 | /**
7 | * Created by jingchaoqinjc on 17/5/15.
8 | */
9 |
10 | public class MethodReplace5_1 implements IMethodReplace {
11 |
12 | static Field artMethodField;
13 |
14 | static {
15 | try {
16 | Class absMethodClass = Class.forName("java.lang.reflect.AbstractMethod");
17 | artMethodField = absMethodClass.getDeclaredField("artMethod");
18 | artMethodField.setAccessible(true);
19 | } catch (Exception e) {
20 | e.printStackTrace();
21 | }
22 | }
23 |
24 | @Override
25 | public void replace(Method src, Method dest) {
26 | try {
27 | Object o1 = artMethodField.get(src);
28 | Object o2 = artMethodField.get(dest);
29 | replaceReal(o1, o2);
30 | } catch (Exception e) {
31 | e.printStackTrace();
32 | }
33 | }
34 |
35 | private void replaceReal(Object src, Object dest) throws Exception {
36 | int methodSize = MethodSizeUtils.methodSize();
37 | int methodIndexOffset = MethodSizeUtils.methodIndexOffset();
38 | //methodIndex need not replace,becase the process of finding method in vtable
39 | int methodIndexOffsetIndex = methodIndexOffset / 4;
40 | //why 1? index 0 is declaring_class, declaring_class need not replace.
41 | for (int i = 1, size = methodSize / 4; i < size; i++) {
42 | if (i != methodIndexOffsetIndex) {
43 | int value = UnsafeProxy.getIntVolatile(dest, i * 4);
44 | UnsafeProxy.putIntVolatile(src, i * 4, value);
45 | }
46 | }
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/src/main/java/com/tmall/wireless/jandfix/MethodReplace6_0.java:
--------------------------------------------------------------------------------
1 | package com.tmall.wireless.jandfix;
2 |
3 | import java.lang.reflect.Field;
4 | import java.lang.reflect.Method;
5 |
6 | /**
7 | * Created by jingchaoqinjc on 17/5/15.
8 | */
9 |
10 | public class MethodReplace6_0 implements IMethodReplace {
11 |
12 | static Field artMethodField;
13 |
14 | static {
15 | try {
16 | Class absMethodClass = Class.forName("java.lang.reflect.AbstractMethod");
17 | artMethodField = absMethodClass.getDeclaredField("artMethod");
18 | artMethodField.setAccessible(true);
19 | } catch (Exception e) {
20 | e.printStackTrace();
21 | }
22 | }
23 |
24 |
25 | @Override
26 | public void replace(Method src, Method dest) {
27 | try {
28 | long artMethodSrc = (long) artMethodField.get(src);
29 | long artMethodDest = (long) artMethodField.get(dest);
30 | replaceReal(artMethodSrc, artMethodDest);
31 | } catch (Exception e) {
32 | e.printStackTrace();
33 | }
34 | }
35 |
36 | private void replaceReal(long src, long dest) throws Exception {
37 | int methodSize = MethodSizeUtils.methodSize();
38 | int methodIndexOffset = MethodSizeUtils.methodIndexOffset();
39 | //methodIndex need not replace,becase the process of finding method in vtable
40 | int methodIndexOffsetIndex = methodIndexOffset / 4;
41 | //why 1? index 0 is declaring_class, declaring_class need not replace.
42 | for (int i = 1, size = methodSize / 4; i < size; i++) {
43 | if (i != methodIndexOffsetIndex) {
44 | int value = UnsafeProxy.getIntVolatile(dest + i * 4);
45 | UnsafeProxy.putIntVolatile(src + i * 4, value);
46 | }
47 | }
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/src/main/java/com/tmall/wireless/jandfix/MethodReplaceArt4_0.java:
--------------------------------------------------------------------------------
1 | package com.tmall.wireless.jandfix;
2 |
3 | import java.lang.reflect.Method;
4 |
5 | /**
6 | * Created by jingchaoqinjc on 17/5/15.
7 | */
8 |
9 | public class MethodReplaceArt4_0 implements IMethodReplace{
10 | @Override
11 | public void replace(Method src, Method dest) {
12 |
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/src/main/java/com/tmall/wireless/jandfix/MethodReplaceProxy.java:
--------------------------------------------------------------------------------
1 | package com.tmall.wireless.jandfix;
2 |
3 | import java.lang.reflect.Method;
4 |
5 | import android.os.Build;
6 |
7 | /**
8 | * Created by jingchaoqinjc on 17/5/15.
9 | */
10 |
11 | public class MethodReplaceProxy implements IMethodReplace {
12 |
13 | private IMethodReplace realReplace;
14 |
15 | private MethodReplaceProxy() {
16 | init();
17 | }
18 |
19 | private void init() {
20 | if (Build.VERSION.SDK_INT >= 14 && Build.VERSION.SDK_INT < 21) {
21 | realReplace = new MethodReplaceDalvik4_0();
22 | } else if (Build.VERSION.SDK_INT == 21) {
23 | realReplace = new MethodReplace5_0();
24 | } else if (Build.VERSION.SDK_INT == 22) {
25 | realReplace = new MethodReplace5_1();
26 | } else if (Build.VERSION.SDK_INT >= 23) {
27 | realReplace = new MethodReplace6_0();
28 | }
29 | }
30 |
31 | public static MethodReplaceProxy instance() {
32 | return Holder.instance;
33 | }
34 |
35 | @Override
36 | public void replace(Method src, Method dest) {
37 | realReplace.replace(src, dest);
38 | }
39 |
40 | private static class Holder {
41 | static MethodReplaceProxy instance = new MethodReplaceProxy();
42 | }
43 |
44 | }
45 |
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/src/main/java/com/tmall/wireless/jandfix/MethodSize5_1.java:
--------------------------------------------------------------------------------
1 | package com.tmall.wireless.jandfix;
2 |
3 | import java.lang.reflect.Field;
4 | import java.lang.reflect.Method;
5 |
6 | /**
7 | * Created by jingchaoqinjc on 17/5/16.
8 | */
9 |
10 | public class MethodSize5_1 implements IMethodSize {
11 |
12 | private static int size =Constants.INVALID_SIZE;
13 | private static int methodIndexOffset = Constants.INVALID_SIZE;
14 |
15 | static {
16 | try {
17 | Field artMethodField;
18 | Class absMethodClass = Class.forName("java.lang.reflect.AbstractMethod");
19 | artMethodField = absMethodClass.getDeclaredField("artMethod");
20 | artMethodField.setAccessible(true);
21 |
22 | //init size
23 | Method method1 = MethodSizeCase.class.getDeclaredMethod("method1");
24 | Method method2 = MethodSizeCase.class.getDeclaredMethod("method2");
25 |
26 | Object object1 = artMethodField.get(method1);
27 | Object object2 = artMethodField.get(method2);
28 |
29 | long method1Addr = UnsafeProxy.getObjectAddress(object1);
30 | long method2Addr = UnsafeProxy.getObjectAddress(object2);
31 | size = (int) (method2Addr - method1Addr);
32 | if (size < 0) {
33 | size = -size;
34 | }
35 |
36 | //init methodIndexOffset
37 | Class artMethodClass = object1.getClass();
38 | Field methodIndexField = artMethodClass.getDeclaredField("methodIndex");
39 |
40 | methodIndexOffset = UnsafeProxy.objectFieldOffset(methodIndexField);
41 | } catch (Exception e) {
42 | e.printStackTrace();
43 | }
44 | }
45 |
46 | @Override
47 | public int methodSize() throws Exception {
48 | return size;
49 | }
50 |
51 | @Override
52 | public int methodIndexOffset() throws Exception {
53 | return methodIndexOffset;
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/src/main/java/com/tmall/wireless/jandfix/MethodSize6_0.java:
--------------------------------------------------------------------------------
1 | package com.tmall.wireless.jandfix;
2 |
3 | import java.lang.reflect.Field;
4 | import java.lang.reflect.Method;
5 |
6 | /**
7 | * Created by jingchaoqinjc on 17/5/16.
8 | */
9 |
10 | public class MethodSize6_0 implements IMethodSize {
11 |
12 | private static int methodSize = Constants.INVALID_SIZE;
13 | private static int methodIndexOffset = Constants.INVALID_SIZE;
14 |
15 | static Field artMethodField;
16 |
17 | static {
18 | try {
19 | Class absMethodClass = Class.forName("java.lang.reflect.AbstractMethod");
20 | artMethodField = absMethodClass.getDeclaredField("artMethod");
21 | artMethodField.setAccessible(true);
22 |
23 | //init size
24 | Method method1 = MethodSizeCase.class.getDeclaredMethod("method1");
25 | Method method2 = MethodSizeCase.class.getDeclaredMethod("method2");
26 | Method method3 = MethodSizeCase.class.getDeclaredMethod("method3");
27 |
28 | long method1Addr = (long) artMethodField.get(method1);
29 | long method2Addr = (long) artMethodField.get(method2);
30 | long method3Addr = (long) artMethodField.get(method3);
31 | methodSize = (int) (method2Addr - method1Addr);
32 | if (methodSize < 0) {
33 | methodSize = -methodSize;
34 | }
35 |
36 | //init methodIndexOffset
37 | int method1MethodIndex = 0;
38 | Method[] methods = MethodSizeCase.class.getDeclaredMethods();
39 | for (int i = 0, size = methods.length; i < size; i++) {
40 | if (methods[i].equals(method1)) {
41 | //why +1? Becase "FindVirtualMethodForVirtualOrInterface(method, sizeof(void*))" has the offset of sizeof(void*)
42 | method1MethodIndex = i + 1;
43 | break;
44 | }
45 | }
46 |
47 | for (int i = 1, size = methodSize / 4; i < size; i++) {
48 | int value1 = UnsafeProxy.getIntVolatile(method1Addr + i * 4);
49 | int value2 = UnsafeProxy.getIntVolatile(method2Addr + i * 4);
50 | int value3 = UnsafeProxy.getIntVolatile(method3Addr + i * 4);
51 | if (value1 == method1MethodIndex
52 | && value2 == method1MethodIndex + 1
53 | && value3 == method1MethodIndex + 2) {
54 | methodIndexOffset = i * 4;
55 | }
56 | }
57 |
58 | } catch (Exception e) {
59 | e.printStackTrace();
60 | }
61 | }
62 |
63 | @Override
64 | public int methodSize() throws Exception {
65 | return methodSize;
66 | }
67 |
68 | @Override
69 | public int methodIndexOffset() throws Exception {
70 | return methodIndexOffset;
71 | }
72 |
73 | }
74 |
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/src/main/java/com/tmall/wireless/jandfix/MethodSizeCase.java:
--------------------------------------------------------------------------------
1 | package com.tmall.wireless.jandfix;
2 |
3 | /**
4 | * Created by jingchaoqinjc on 17/5/16.
5 | */
6 | public final class MethodSizeCase {
7 |
8 | private void method1() {
9 | }
10 |
11 | private void method2() {
12 | }
13 |
14 | private void method3() {
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/src/main/java/com/tmall/wireless/jandfix/MethodSizeUtils.java:
--------------------------------------------------------------------------------
1 | package com.tmall.wireless.jandfix;
2 |
3 | import android.os.Build;
4 |
5 | /**
6 | * Created by jingchaoqinjc on 17/5/16.
7 | */
8 |
9 | public class MethodSizeUtils {
10 |
11 | private static int size = Constants.INVALID_SIZE;
12 | private static IMethodSize methodSize = null;
13 | private static int methodIndexOffset = Constants.INVALID_SIZE;
14 |
15 | static {
16 | if (Build.VERSION.SDK_INT >= 14 && Build.VERSION.SDK_INT < 21) {
17 | } else if (Build.VERSION.SDK_INT == 21) {
18 | } else if (Build.VERSION.SDK_INT == 22) {
19 | methodSize = new MethodSize5_1();
20 | } else if (Build.VERSION.SDK_INT >= 23) {
21 | methodSize = new MethodSize6_0();
22 | }
23 | }
24 |
25 | public static int methodSize() throws Exception {
26 | if (size == Constants.INVALID_SIZE) {
27 | size = methodSize.methodSize();
28 | }
29 | if(size == Constants.INVALID_SIZE){
30 | throw new RuntimeException();
31 | }
32 | return size;
33 | }
34 |
35 | public static int methodIndexOffset() throws Exception {
36 | if (methodIndexOffset == Constants.INVALID_SIZE) {
37 | methodIndexOffset = methodSize.methodIndexOffset();
38 | }
39 |
40 | if(methodIndexOffset == Constants.INVALID_SIZE){
41 | throw new RuntimeException();
42 | }
43 |
44 | return methodIndexOffset;
45 | }
46 |
47 | }
48 |
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/src/main/res/drawable-v24/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
12 |
13 |
19 |
22 |
25 |
26 |
27 |
28 |
34 |
35 |
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
17 |
18 |
25 |
26 |
32 |
33 |
39 |
40 |
44 |
45 |
52 |
53 |
60 |
61 |
67 |
68 |
75 |
76 |
83 |
84 |
85 |
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/hotfix_about/hotfixdemo/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/hotfix_about/hotfixdemo/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/hotfix_about/hotfixdemo/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/hotfix_about/hotfixdemo/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/hotfix_about/hotfixdemo/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/hotfix_about/hotfixdemo/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/hotfix_about/hotfixdemo/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/hotfix_about/hotfixdemo/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/hotfix_about/hotfixdemo/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/hotfix_about/hotfixdemo/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | hotfixdemo
3 | 改变本文案(原来的)
4 |
5 |
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/source_code/hotfix_about/hotfixdemo/src/test/java/com/guolei/hotfixdemo/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.guolei.hotfixdemo;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() throws Exception {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/source_code/plugin_about/Android插件化-1.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/plugin_about/Android插件化-1.pdf
--------------------------------------------------------------------------------
/source_code/plugin_about/Android插件化-2.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/plugin_about/Android插件化-2.pdf
--------------------------------------------------------------------------------
/source_code/plugin_about/README.md:
--------------------------------------------------------------------------------
1 |
2 | 所涉及到的代码全部通过Nexus 5,Android6.0 Dalvik虚拟机测试
3 |
4 | plugindemo-release-unsigned.apk 为测试包,plugin_1.apk,plugin_so.apk为插件包,simpledex.jar为dex文件。
5 |
6 | adb install -t 测试包
7 | adb push 插件包 /sdcard/
8 | adb push dex文件 /sdcard/
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_1.apk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/plugin_about/plugin_1.apk
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_1/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_1/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 | apply plugin: 'com.didi.virtualapk.plugin'
3 |
4 | android {
5 | compileSdkVersion 26
6 | buildToolsVersion "26.0.2"
7 |
8 |
9 | defaultConfig {
10 | applicationId "com.guolei.plugin_1"
11 | minSdkVersion 19
12 | targetSdkVersion 26
13 | versionCode 1
14 | versionName "1.0"
15 |
16 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
17 |
18 | }
19 |
20 | buildTypes {
21 | release {
22 | minifyEnabled false
23 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
24 | }
25 | }
26 |
27 | }
28 |
29 | virtualApk {
30 | packageId = 0x6f // The package id of Resources.
31 | targetHost='plugindemo' // The path of application module in host project.
32 | applyHostMapping = true // [Optional] Default value is true.
33 | }
34 |
35 | dependencies {
36 | compile fileTree(dir: 'libs', include: ['*.jar'])
37 | compile 'com.android.support:appcompat-v7:26.1.0'
38 | compile 'com.android.support.constraint:constraint-layout:1.0.2'
39 | testCompile 'junit:junit:4.12'
40 | androidTestCompile('com.android.support.test.espresso:espresso-core:3.0.1', {
41 | exclude group: 'com.android.support', module: 'support-annotations'
42 | })
43 |
44 | }
45 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_1/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_1/src/androidTest/java/com/guolei/plugin_1/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.guolei.plugin_1;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumented test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() throws Exception {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.guolei.plugin_1", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_1/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_1/src/main/java/com/guolei/plugin_1/People.java:
--------------------------------------------------------------------------------
1 | package com.guolei.plugin_1;
2 |
3 | // _ _ _ _
4 | //__ _____ _ __| | _| |_(_) | ___
5 | //\ \ /\ / / _ \| '__| |/ / __| | |/ _ \
6 | // \ V V / (_) | | | <| |_| | | __/
7 | // \_/\_/ \___/|_| |_|\_\\__|_|_|\___|
8 |
9 |
10 | /**
11 | * Copyright © 2013-2017 Worktile. All Rights Reserved.
12 | * Author: guolei
13 | * Email: 1120832563@qq.com
14 | * Date: 18/3/11
15 | * Time: 下午3:49
16 | * Desc:
17 | */
18 | public class People {
19 |
20 | private String mName;
21 | private int mAge;
22 |
23 | public People(String name, int age) {
24 | mName = name;
25 | mAge = age;
26 | }
27 |
28 | @Override
29 | public String toString() {
30 | return "from plugin_1:[mName =" + mName + ";mAge=" + mAge + "]";
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_1/src/main/java/com/guolei/plugin_1/PluginActivity.java:
--------------------------------------------------------------------------------
1 | package com.guolei.plugin_1;
2 |
3 | import android.content.Intent;
4 | import android.net.Uri;
5 | import android.support.v7.app.AppCompatActivity;
6 | import android.os.Bundle;
7 | import android.util.Log;
8 | import android.view.View;
9 |
10 | public class PluginActivity extends AppCompatActivity {
11 |
12 | @Override
13 | protected void onCreate(Bundle savedInstanceState) {
14 | super.onCreate(savedInstanceState);
15 | setContentView(R.layout.activity_plugin);
16 | Log.e("plugin", "onCreate: " + "this is plugin activity");
17 | findViewById(R.id.send).setOnClickListener(new View.OnClickListener() {
18 | @Override
19 | public void onClick(View v) {
20 | Intent intent = new Intent();
21 | intent.setAction("com.guolei.plugin_1.action");
22 | PluginActivity.this.sendBroadcast(intent);
23 | }
24 | });
25 | findViewById(R.id.query).setOnClickListener(new View.OnClickListener() {
26 | @Override
27 | public void onClick(View v) {
28 | query();
29 | }
30 | });
31 | }
32 |
33 | private void query() {
34 | getContentResolver().query(Uri.parse("content://com.guolei.plugin_1.provider"),
35 | null, null, null, null);
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_1/src/main/java/com/guolei/plugin_1/PluginContentProvider.java:
--------------------------------------------------------------------------------
1 | package com.guolei.plugin_1;
2 |
3 | import android.content.ContentProvider;
4 | import android.content.ContentValues;
5 | import android.database.Cursor;
6 | import android.net.Uri;
7 | import android.support.annotation.NonNull;
8 | import android.support.annotation.Nullable;
9 | import android.util.Log;
10 |
11 |
12 | // _ _ _ _
13 | //__ _____ _ __| | _| |_(_) | ___
14 | //\ \ /\ / / _ \| '__| |/ / __| | |/ _ \
15 | // \ V V / (_) | | | <| |_| | | __/
16 | // \_/\_/ \___/|_| |_|\_\\__|_|_|\___|
17 |
18 |
19 | /**
20 | * Copyright © 2013-2017 Worktile. All Rights Reserved.
21 | * Author: guolei
22 | * Email: 1120832563@qq.com
23 | * Date: 18/3/27
24 | * Time: 下午3:38
25 | * Desc:
26 | */
27 | public class PluginContentProvider extends ContentProvider {
28 |
29 | private static final String TAG = "plugin";
30 |
31 | @Override
32 | public boolean onCreate() {
33 | Log.e(TAG, "onCreate: " + "plugin ContentProvider" );
34 | return true;
35 | }
36 |
37 | @Nullable
38 | @Override
39 | public Cursor query(@NonNull Uri uri, @Nullable String[] projection, @Nullable String selection, @Nullable String[] selectionArgs, @Nullable String sortOrder) {
40 | Log.e(TAG, "query: " + "plugin ContentProvider" );
41 | return null;
42 | }
43 |
44 | @Nullable
45 | @Override
46 | public String getType(@NonNull Uri uri) {
47 | Log.e(TAG, "getType: " + "plugin ContentProvider" );
48 | return null;
49 | }
50 |
51 | @Nullable
52 | @Override
53 | public Uri insert(@NonNull Uri uri, @Nullable ContentValues values) {
54 | return null;
55 | }
56 |
57 | @Override
58 | public int delete(@NonNull Uri uri, @Nullable String selection, @Nullable String[] selectionArgs) {
59 | return 0;
60 | }
61 |
62 | @Override
63 | public int update(@NonNull Uri uri, @Nullable ContentValues values, @Nullable String selection, @Nullable String[] selectionArgs) {
64 | return 0;
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_1/src/main/java/com/guolei/plugin_1/PluginReceiver.java:
--------------------------------------------------------------------------------
1 | package com.guolei.plugin_1;
2 |
3 | import android.content.BroadcastReceiver;
4 | import android.content.Context;
5 | import android.content.Intent;
6 | import android.util.Log;
7 |
8 |
9 | // _ _ _ _
10 | //__ _____ _ __| | _| |_(_) | ___
11 | //\ \ /\ / / _ \| '__| |/ / __| | |/ _ \
12 | // \ V V / (_) | | | <| |_| | | __/
13 | // \_/\_/ \___/|_| |_|\_\\__|_|_|\___|
14 |
15 |
16 | /**
17 | * Copyright © 2013-2017 Worktile. All Rights Reserved.
18 | * Author: guolei
19 | * Email: 1120832563@qq.com
20 | * Date: 18/3/26
21 | * Time: 下午4:49
22 | * Desc:
23 | */
24 | public class PluginReceiver extends BroadcastReceiver {
25 | @Override
26 | public void onReceive(Context context, Intent intent) {
27 | Log.e("plugin", "onReceive: 这是插件里面的");
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_1/src/main/res/drawable-v24/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
12 |
13 |
19 |
22 |
25 |
26 |
27 |
28 |
34 |
35 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_1/src/main/res/layout/activity_plugin.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
18 |
19 |
25 |
26 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_1/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_1/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_1/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/plugin_about/plugin_1/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_1/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/plugin_about/plugin_1/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_1/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/plugin_about/plugin_1/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_1/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/plugin_about/plugin_1/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_1/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/plugin_about/plugin_1/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_1/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/plugin_about/plugin_1/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_1/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/plugin_about/plugin_1/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_1/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/plugin_about/plugin_1/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_1/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/plugin_about/plugin_1/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_1/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/plugin_about/plugin_1/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_1/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_1/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | plugin_1
3 |
4 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_1/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_1/src/test/java/com/guolei/plugin_1/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.guolei.plugin_1;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() throws Exception {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_so.apk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/plugin_about/plugin_so.apk
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_so/.externalNativeBuild/cmake/debug/armeabi/.ninja_deps:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/plugin_about/plugin_so/.externalNativeBuild/cmake/debug/armeabi/.ninja_deps
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_so/.externalNativeBuild/cmake/debug/armeabi/.ninja_log:
--------------------------------------------------------------------------------
1 | # ninja log v5
2 | 0 240 0 CMakeFiles/native-lib.dir/src/main/cpp/native-lib.cpp.o aec76b0cbcf217a
3 | 240 319 0 ../../../../build/intermediates/cmake/debug/obj/armeabi/libnative-lib.so baf086bcaf754902
4 | 0 190 0 CMakeFiles/native-lib.dir/src/main/cpp/native-lib.cpp.o aec76b0cbcf217a
5 | 190 261 0 ../../../../build/intermediates/cmake/debug/obj/armeabi/libnative-lib.so baf086bcaf754902
6 | 1 242 0 CMakeFiles/native-lib.dir/src/main/cpp/native-lib.cpp.o aec76b0cbcf217a
7 | 242 332 0 ../../../../build/intermediates/cmake/debug/obj/armeabi/libnative-lib.so baf086bcaf754902
8 | 0 165 0 CMakeFiles/native-lib.dir/src/main/cpp/native-lib.cpp.o aec76b0cbcf217a
9 | 165 222 0 ../../../../build/intermediates/cmake/debug/obj/armeabi/libnative-lib.so baf086bcaf754902
10 | 1 284 0 CMakeFiles/native-lib.dir/src/main/cpp/native-lib.cpp.o aec76b0cbcf217a
11 | 284 383 0 ../../../../build/intermediates/cmake/debug/obj/armeabi/libnative-lib.so baf086bcaf754902
12 | 1 316 0 CMakeFiles/native-lib.dir/src/main/cpp/native-lib.cpp.o aec76b0cbcf217a
13 | 316 433 0 ../../../../build/intermediates/cmake/debug/obj/armeabi/libnative-lib.so baf086bcaf754902
14 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_so/.externalNativeBuild/cmake/debug/armeabi/CMakeFiles/3.6.0-rc2/CMakeCCompiler.cmake:
--------------------------------------------------------------------------------
1 | set(CMAKE_C_COMPILER "/Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang")
2 | set(CMAKE_C_COMPILER_ARG1 "")
3 | set(CMAKE_C_COMPILER_ID "Clang")
4 | set(CMAKE_C_COMPILER_VERSION "")
5 | set(CMAKE_C_COMPILER_WRAPPER "")
6 | set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "")
7 | set(CMAKE_C_COMPILE_FEATURES "")
8 | set(CMAKE_C90_COMPILE_FEATURES "")
9 | set(CMAKE_C99_COMPILE_FEATURES "")
10 | set(CMAKE_C11_COMPILE_FEATURES "")
11 |
12 | set(CMAKE_C_PLATFORM_ID "")
13 | set(CMAKE_C_SIMULATE_ID "")
14 | set(CMAKE_C_SIMULATE_VERSION "")
15 |
16 | set(CMAKE_AR "/Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-ar")
17 | set(CMAKE_RANLIB "/Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-ranlib")
18 | set(CMAKE_LINKER "/Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-ld")
19 | set(CMAKE_COMPILER_IS_GNUCC )
20 | set(CMAKE_C_COMPILER_LOADED 1)
21 | set(CMAKE_C_COMPILER_WORKS TRUE)
22 | set(CMAKE_C_ABI_COMPILED TRUE)
23 | set(CMAKE_COMPILER_IS_MINGW )
24 | set(CMAKE_COMPILER_IS_CYGWIN )
25 | if(CMAKE_COMPILER_IS_CYGWIN)
26 | set(CYGWIN 1)
27 | set(UNIX 1)
28 | endif()
29 |
30 | set(CMAKE_C_COMPILER_ENV_VAR "CC")
31 |
32 | if(CMAKE_COMPILER_IS_MINGW)
33 | set(MINGW 1)
34 | endif()
35 | set(CMAKE_C_COMPILER_ID_RUN 1)
36 | set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m)
37 | set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC)
38 | set(CMAKE_C_LINKER_PREFERENCE 10)
39 |
40 | # Save compiler ABI information.
41 | set(CMAKE_C_SIZEOF_DATA_PTR "4")
42 | set(CMAKE_C_COMPILER_ABI "ELF")
43 | set(CMAKE_C_LIBRARY_ARCHITECTURE "")
44 |
45 | if(CMAKE_C_SIZEOF_DATA_PTR)
46 | set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}")
47 | endif()
48 |
49 | if(CMAKE_C_COMPILER_ABI)
50 | set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}")
51 | endif()
52 |
53 | if(CMAKE_C_LIBRARY_ARCHITECTURE)
54 | set(CMAKE_LIBRARY_ARCHITECTURE "")
55 | endif()
56 |
57 | set(CMAKE_C_CL_SHOWINCLUDES_PREFIX "")
58 | if(CMAKE_C_CL_SHOWINCLUDES_PREFIX)
59 | set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_C_CL_SHOWINCLUDES_PREFIX}")
60 | endif()
61 |
62 |
63 |
64 |
65 | set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "dl;c;dl")
66 | set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "/Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/lib/gcc/arm-linux-androideabi/4.9.x;/Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/arm-linux-androideabi/lib;/Users/guolei/Library/Android/sdk/ndk-bundle/platforms/android-19/arch-arm/usr/lib")
67 | set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "")
68 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_so/.externalNativeBuild/cmake/debug/armeabi/CMakeFiles/3.6.0-rc2/CMakeCXXCompiler.cmake:
--------------------------------------------------------------------------------
1 | set(CMAKE_CXX_COMPILER "/Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++")
2 | set(CMAKE_CXX_COMPILER_ARG1 "")
3 | set(CMAKE_CXX_COMPILER_ID "Clang")
4 | set(CMAKE_CXX_COMPILER_VERSION "")
5 | set(CMAKE_CXX_COMPILER_WRAPPER "")
6 | set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT "")
7 | set(CMAKE_CXX_COMPILE_FEATURES "")
8 | set(CMAKE_CXX98_COMPILE_FEATURES "")
9 | set(CMAKE_CXX11_COMPILE_FEATURES "")
10 | set(CMAKE_CXX14_COMPILE_FEATURES "")
11 |
12 | set(CMAKE_CXX_PLATFORM_ID "")
13 | set(CMAKE_CXX_SIMULATE_ID "")
14 | set(CMAKE_CXX_SIMULATE_VERSION "")
15 |
16 | set(CMAKE_AR "/Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-ar")
17 | set(CMAKE_RANLIB "/Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-ranlib")
18 | set(CMAKE_LINKER "/Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-ld")
19 | set(CMAKE_COMPILER_IS_GNUCXX )
20 | set(CMAKE_CXX_COMPILER_LOADED 1)
21 | set(CMAKE_CXX_COMPILER_WORKS TRUE)
22 | set(CMAKE_CXX_ABI_COMPILED TRUE)
23 | set(CMAKE_COMPILER_IS_MINGW )
24 | set(CMAKE_COMPILER_IS_CYGWIN )
25 | if(CMAKE_COMPILER_IS_CYGWIN)
26 | set(CYGWIN 1)
27 | set(UNIX 1)
28 | endif()
29 |
30 | set(CMAKE_CXX_COMPILER_ENV_VAR "CXX")
31 |
32 | if(CMAKE_COMPILER_IS_MINGW)
33 | set(MINGW 1)
34 | endif()
35 | set(CMAKE_CXX_COMPILER_ID_RUN 1)
36 | set(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC)
37 | set(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;mm;CPP)
38 | set(CMAKE_CXX_LINKER_PREFERENCE 30)
39 | set(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1)
40 |
41 | # Save compiler ABI information.
42 | set(CMAKE_CXX_SIZEOF_DATA_PTR "4")
43 | set(CMAKE_CXX_COMPILER_ABI "ELF")
44 | set(CMAKE_CXX_LIBRARY_ARCHITECTURE "")
45 |
46 | if(CMAKE_CXX_SIZEOF_DATA_PTR)
47 | set(CMAKE_SIZEOF_VOID_P "${CMAKE_CXX_SIZEOF_DATA_PTR}")
48 | endif()
49 |
50 | if(CMAKE_CXX_COMPILER_ABI)
51 | set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_CXX_COMPILER_ABI}")
52 | endif()
53 |
54 | if(CMAKE_CXX_LIBRARY_ARCHITECTURE)
55 | set(CMAKE_LIBRARY_ARCHITECTURE "")
56 | endif()
57 |
58 | set(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX "")
59 | if(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX)
60 | set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_CXX_CL_SHOWINCLUDES_PREFIX}")
61 | endif()
62 |
63 |
64 |
65 |
66 | set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "stdc++;m;dl;c;dl")
67 | set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "/Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/lib/gcc/arm-linux-androideabi/4.9.x;/Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/arm-linux-androideabi/lib;/Users/guolei/Library/Android/sdk/ndk-bundle/platforms/android-19/arch-arm/usr/lib")
68 | set(CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "")
69 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_so/.externalNativeBuild/cmake/debug/armeabi/CMakeFiles/3.6.0-rc2/CMakeDetermineCompilerABI_C.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/plugin_about/plugin_so/.externalNativeBuild/cmake/debug/armeabi/CMakeFiles/3.6.0-rc2/CMakeDetermineCompilerABI_C.bin
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_so/.externalNativeBuild/cmake/debug/armeabi/CMakeFiles/3.6.0-rc2/CMakeDetermineCompilerABI_CXX.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/plugin_about/plugin_so/.externalNativeBuild/cmake/debug/armeabi/CMakeFiles/3.6.0-rc2/CMakeDetermineCompilerABI_CXX.bin
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_so/.externalNativeBuild/cmake/debug/armeabi/CMakeFiles/3.6.0-rc2/CMakeSystem.cmake:
--------------------------------------------------------------------------------
1 | set(CMAKE_HOST_SYSTEM "Darwin-15.6.0")
2 | set(CMAKE_HOST_SYSTEM_NAME "Darwin")
3 | set(CMAKE_HOST_SYSTEM_VERSION "15.6.0")
4 | set(CMAKE_HOST_SYSTEM_PROCESSOR "x86_64")
5 |
6 | include("/Users/guolei/Library/Android/sdk/ndk-bundle/build/cmake/android.toolchain.cmake")
7 |
8 | set(CMAKE_SYSTEM "Android-19")
9 | set(CMAKE_SYSTEM_NAME "Android")
10 | set(CMAKE_SYSTEM_VERSION "19")
11 | set(CMAKE_SYSTEM_PROCESSOR "armv5te")
12 |
13 | set(CMAKE_CROSSCOMPILING "TRUE")
14 |
15 | set(CMAKE_SYSTEM_LOADED 1)
16 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_so/.externalNativeBuild/cmake/debug/armeabi/CMakeFiles/TargetDirectories.txt:
--------------------------------------------------------------------------------
1 | /Users/guolei/AndroidStudioProjects/Demo/plugin_so/.externalNativeBuild/cmake/debug/armeabi/CMakeFiles/edit_cache.dir
2 | /Users/guolei/AndroidStudioProjects/Demo/plugin_so/.externalNativeBuild/cmake/debug/armeabi/CMakeFiles/rebuild_cache.dir
3 | /Users/guolei/AndroidStudioProjects/Demo/plugin_so/.externalNativeBuild/cmake/debug/armeabi/CMakeFiles/native-lib.dir
4 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_so/.externalNativeBuild/cmake/debug/armeabi/CMakeFiles/cmake.check_cache:
--------------------------------------------------------------------------------
1 | # This file is generated by cmake for dependency checking of the CMakeCache.txt file
2 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_so/.externalNativeBuild/cmake/debug/armeabi/CMakeFiles/native-lib.dir/src/main/cpp/native-lib.cpp.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/plugin_about/plugin_so/.externalNativeBuild/cmake/debug/armeabi/CMakeFiles/native-lib.dir/src/main/cpp/native-lib.cpp.o
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_so/.externalNativeBuild/cmake/debug/armeabi/android_gradle_build.json:
--------------------------------------------------------------------------------
1 |
2 | {
3 | "buildFiles" : [ "/Users/guolei/AndroidStudioProjects/Demo/plugin_so/CMakeLists.txt" ],
4 | "cleanCommands" :
5 | [
6 | "/Users/guolei/Library/Android/sdk/cmake/3.6.3155560/bin/cmake --build /Users/guolei/AndroidStudioProjects/Demo/plugin_so/.externalNativeBuild/cmake/debug/armeabi --target clean"
7 | ],
8 | "cppFileExtensions" : [ "cpp" ],
9 | "libraries" :
10 | {
11 | "native-lib-Debug-armeabi" :
12 | {
13 | "abi" : "armeabi",
14 | "artifactName" : "native-lib",
15 | "buildCommand" : "/Users/guolei/Library/Android/sdk/cmake/3.6.3155560/bin/cmake --build /Users/guolei/AndroidStudioProjects/Demo/plugin_so/.externalNativeBuild/cmake/debug/armeabi --target native-lib",
16 | "buildType" : "debug",
17 | "files" :
18 | [
19 |
20 | {
21 | "flags" : " -target armv5te-none-linux-androideabi -gcc-toolchain /Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64 --sysroot=/Users/guolei/Library/Android/sdk/ndk-bundle/platforms/android-19/arch-arm -Dnative_lib_EXPORTS -isystem /Users/guolei/Library/Android/sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include -isystem /Users/guolei/Library/Android/sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi/include -isystem /Users/guolei/Library/Android/sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include/backward -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -march=armv5te -mtune=xscale -msoft-float -fno-integrated-as -mthumb -Wa,--noexecstack -Wformat -Werror=format-security -fno-exceptions -fno-rtti -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -march=armv5te -mtune=xscale -msoft-float -fno-integrated-as -mthumb -Wa,--noexecstack -Wformat -Werror=format-security -fno-exceptions -fno-rtti -O0 -fno-limit-debug-info -O0 -fno-limit-debug-info -fPIC -c ",
22 | "src" : "/Users/guolei/AndroidStudioProjects/Demo/plugin_so/src/main/cpp/native-lib.cpp",
23 | "workingDirectory" : "/Users/guolei/AndroidStudioProjects/Demo/plugin_so/.externalNativeBuild/cmake/debug/armeabi"
24 | }
25 | ],
26 | "output" : "/Users/guolei/AndroidStudioProjects/Demo/plugin_so/build/intermediates/cmake/debug/obj/armeabi/libnative-lib.so",
27 | "toolchain" : "14328697835032828871"
28 | }
29 | },
30 | "toolchains" :
31 | {
32 | "14328697835032828871" :
33 | {
34 | "cCompilerExecutable" : "/Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang",
35 | "cppCompilerExecutable" : "/Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++"
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_so/.externalNativeBuild/cmake/debug/armeabi/cmake_build_command.txt:
--------------------------------------------------------------------------------
1 | Executable : /Users/guolei/Library/Android/sdk/cmake/3.6.3155560/bin/cmake
2 | arguments :
3 | -H/Users/guolei/AndroidStudioProjects/Demo/plugin_so
4 | -B/Users/guolei/AndroidStudioProjects/Demo/plugin_so/.externalNativeBuild/cmake/debug/armeabi
5 | -GAndroid Gradle - Ninja
6 | -DANDROID_ABI=armeabi
7 | -DANDROID_NDK=/Users/guolei/Library/Android/sdk/ndk-bundle
8 | -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/Users/guolei/AndroidStudioProjects/Demo/plugin_so/build/intermediates/cmake/debug/obj/armeabi
9 | -DCMAKE_BUILD_TYPE=Debug
10 | -DCMAKE_MAKE_PROGRAM=/Users/guolei/Library/Android/sdk/cmake/3.6.3155560/bin/ninja
11 | -DCMAKE_TOOLCHAIN_FILE=/Users/guolei/Library/Android/sdk/ndk-bundle/build/cmake/android.toolchain.cmake
12 | -DANDROID_PLATFORM=android-19
13 | -DCMAKE_CXX_FLAGS=
14 | jvmArgs :
15 |
16 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_so/.externalNativeBuild/cmake/debug/armeabi/cmake_build_output.txt:
--------------------------------------------------------------------------------
1 | -- Check for working C compiler: /Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang
2 | -- Check for working C compiler: /Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang -- works
3 | -- Detecting C compiler ABI info
4 | -- Detecting C compiler ABI info - done
5 | -- Detecting C compile features
6 | -- Detecting C compile features - done
7 | -- Check for working CXX compiler: /Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++
8 | -- Check for working CXX compiler: /Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ -- works
9 | -- Detecting CXX compiler ABI info
10 | -- Detecting CXX compiler ABI info - done
11 | -- Detecting CXX compile features
12 | -- Detecting CXX compile features - done
13 | -- Configuring done
14 | -- Generating done
15 | -- Build files have been written to: /Users/guolei/AndroidStudioProjects/Demo/plugin_so/.externalNativeBuild/cmake/debug/armeabi
16 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_so/.externalNativeBuild/cmake/debug/armeabi/cmake_install.cmake:
--------------------------------------------------------------------------------
1 | # Install script for directory: /Users/guolei/AndroidStudioProjects/Demo/plugin_so
2 |
3 | # Set the install prefix
4 | if(NOT DEFINED CMAKE_INSTALL_PREFIX)
5 | set(CMAKE_INSTALL_PREFIX "/usr/local")
6 | endif()
7 | string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
8 |
9 | # Set the install configuration name.
10 | if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
11 | if(BUILD_TYPE)
12 | string(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
13 | CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
14 | else()
15 | set(CMAKE_INSTALL_CONFIG_NAME "Debug")
16 | endif()
17 | message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
18 | endif()
19 |
20 | # Set the component getting installed.
21 | if(NOT CMAKE_INSTALL_COMPONENT)
22 | if(COMPONENT)
23 | message(STATUS "Install component: \"${COMPONENT}\"")
24 | set(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
25 | else()
26 | set(CMAKE_INSTALL_COMPONENT)
27 | endif()
28 | endif()
29 |
30 | # Install shared libraries without execute permission?
31 | if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE)
32 | set(CMAKE_INSTALL_SO_NO_EXE "0")
33 | endif()
34 |
35 | if(CMAKE_INSTALL_COMPONENT)
36 | set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt")
37 | else()
38 | set(CMAKE_INSTALL_MANIFEST "install_manifest.txt")
39 | endif()
40 |
41 | string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT
42 | "${CMAKE_INSTALL_MANIFEST_FILES}")
43 | file(WRITE "/Users/guolei/AndroidStudioProjects/Demo/plugin_so/.externalNativeBuild/cmake/debug/armeabi/${CMAKE_INSTALL_MANIFEST}"
44 | "${CMAKE_INSTALL_MANIFEST_CONTENT}")
45 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_so/.externalNativeBuild/cmake/debug/armeabi/rules.ninja:
--------------------------------------------------------------------------------
1 | # CMAKE generated file: DO NOT EDIT!
2 | # Generated by "Ninja" Generator, CMake Version 3.6
3 |
4 | # This file contains all the rules used to get the outputs files
5 | # built from the input files.
6 | # It is included in the main 'build.ninja'.
7 |
8 | # =============================================================================
9 | # Project: Project
10 | # Configuration: Debug
11 | # =============================================================================
12 | # =============================================================================
13 |
14 | #############################################
15 | # Rule for running custom commands.
16 |
17 | rule CUSTOM_COMMAND
18 | command = $COMMAND
19 | description = $DESC
20 |
21 |
22 | #############################################
23 | # Rule for compiling CXX files.
24 |
25 | rule CXX_COMPILER__native-lib
26 | depfile = $DEP_FILE
27 | deps = gcc
28 | command = /Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ -target armv5te-none-linux-androideabi -gcc-toolchain /Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64 --sysroot=/Users/guolei/Library/Android/sdk/ndk-bundle/platforms/android-19/arch-arm $DEFINES $INCLUDES $FLAGS -MD -MT $out -MF $DEP_FILE -o $out -c $IN_ABS
29 | description = Building CXX object $out
30 |
31 |
32 | #############################################
33 | # Rule for linking CXX shared library.
34 |
35 | rule CXX_SHARED_LIBRARY_LINKER__native-lib
36 | command = $PRE_LINK && /Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ -target armv5te-none-linux-androideabi -gcc-toolchain /Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64 --sysroot=/Users/guolei/Library/Android/sdk/ndk-bundle/platforms/android-19/arch-arm -fPIC $LANGUAGE_COMPILE_FLAGS $ARCH_FLAGS $LINK_FLAGS -shared $SONAME_FLAG$SONAME -o $TARGET_FILE $in $LINK_PATH $LINK_LIBRARIES && $POST_BUILD
37 | description = Linking CXX shared library $TARGET_FILE
38 | restat = $RESTAT
39 |
40 |
41 | #############################################
42 | # Rule for re-running cmake.
43 |
44 | rule RERUN_CMAKE
45 | command = /Users/guolei/Library/Android/sdk/cmake/3.6.3155560/bin/cmake -H/Users/guolei/AndroidStudioProjects/Demo/plugin_so -B/Users/guolei/AndroidStudioProjects/Demo/plugin_so/.externalNativeBuild/cmake/debug/armeabi
46 | description = Re-running CMake...
47 | generator = 1
48 |
49 |
50 | #############################################
51 | # Rule for cleaning all built files.
52 |
53 | rule CLEAN
54 | command = /Users/guolei/Library/Android/sdk/cmake/3.6.3155560/bin/ninja -t clean
55 | description = Cleaning all built files...
56 |
57 |
58 | #############################################
59 | # Rule for printing all primary targets available.
60 |
61 | rule HELP
62 | command = /Users/guolei/Library/Android/sdk/cmake/3.6.3155560/bin/ninja -t targets
63 | description = All primary targets available:
64 |
65 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_so/.externalNativeBuild/cmake/release/armeabi/.ninja_deps:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/plugin_about/plugin_so/.externalNativeBuild/cmake/release/armeabi/.ninja_deps
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_so/.externalNativeBuild/cmake/release/armeabi/.ninja_log:
--------------------------------------------------------------------------------
1 | # ninja log v5
2 | 0 174 0 CMakeFiles/native-lib.dir/src/main/cpp/native-lib.cpp.o 5079a1ae6eae5ad5
3 | 175 233 0 ../../../../build/intermediates/cmake/release/obj/armeabi/libnative-lib.so c732bf5328e24064
4 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_so/.externalNativeBuild/cmake/release/armeabi/CMakeFiles/3.6.0-rc2/CMakeCCompiler.cmake:
--------------------------------------------------------------------------------
1 | set(CMAKE_C_COMPILER "/Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang")
2 | set(CMAKE_C_COMPILER_ARG1 "")
3 | set(CMAKE_C_COMPILER_ID "Clang")
4 | set(CMAKE_C_COMPILER_VERSION "")
5 | set(CMAKE_C_COMPILER_WRAPPER "")
6 | set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "")
7 | set(CMAKE_C_COMPILE_FEATURES "")
8 | set(CMAKE_C90_COMPILE_FEATURES "")
9 | set(CMAKE_C99_COMPILE_FEATURES "")
10 | set(CMAKE_C11_COMPILE_FEATURES "")
11 |
12 | set(CMAKE_C_PLATFORM_ID "")
13 | set(CMAKE_C_SIMULATE_ID "")
14 | set(CMAKE_C_SIMULATE_VERSION "")
15 |
16 | set(CMAKE_AR "/Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-ar")
17 | set(CMAKE_RANLIB "/Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-ranlib")
18 | set(CMAKE_LINKER "/Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-ld")
19 | set(CMAKE_COMPILER_IS_GNUCC )
20 | set(CMAKE_C_COMPILER_LOADED 1)
21 | set(CMAKE_C_COMPILER_WORKS TRUE)
22 | set(CMAKE_C_ABI_COMPILED TRUE)
23 | set(CMAKE_COMPILER_IS_MINGW )
24 | set(CMAKE_COMPILER_IS_CYGWIN )
25 | if(CMAKE_COMPILER_IS_CYGWIN)
26 | set(CYGWIN 1)
27 | set(UNIX 1)
28 | endif()
29 |
30 | set(CMAKE_C_COMPILER_ENV_VAR "CC")
31 |
32 | if(CMAKE_COMPILER_IS_MINGW)
33 | set(MINGW 1)
34 | endif()
35 | set(CMAKE_C_COMPILER_ID_RUN 1)
36 | set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m)
37 | set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC)
38 | set(CMAKE_C_LINKER_PREFERENCE 10)
39 |
40 | # Save compiler ABI information.
41 | set(CMAKE_C_SIZEOF_DATA_PTR "4")
42 | set(CMAKE_C_COMPILER_ABI "ELF")
43 | set(CMAKE_C_LIBRARY_ARCHITECTURE "")
44 |
45 | if(CMAKE_C_SIZEOF_DATA_PTR)
46 | set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}")
47 | endif()
48 |
49 | if(CMAKE_C_COMPILER_ABI)
50 | set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}")
51 | endif()
52 |
53 | if(CMAKE_C_LIBRARY_ARCHITECTURE)
54 | set(CMAKE_LIBRARY_ARCHITECTURE "")
55 | endif()
56 |
57 | set(CMAKE_C_CL_SHOWINCLUDES_PREFIX "")
58 | if(CMAKE_C_CL_SHOWINCLUDES_PREFIX)
59 | set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_C_CL_SHOWINCLUDES_PREFIX}")
60 | endif()
61 |
62 |
63 |
64 |
65 | set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "dl;c;dl")
66 | set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "/Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/lib/gcc/arm-linux-androideabi/4.9.x;/Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/arm-linux-androideabi/lib;/Users/guolei/Library/Android/sdk/ndk-bundle/platforms/android-19/arch-arm/usr/lib")
67 | set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "")
68 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_so/.externalNativeBuild/cmake/release/armeabi/CMakeFiles/3.6.0-rc2/CMakeCXXCompiler.cmake:
--------------------------------------------------------------------------------
1 | set(CMAKE_CXX_COMPILER "/Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++")
2 | set(CMAKE_CXX_COMPILER_ARG1 "")
3 | set(CMAKE_CXX_COMPILER_ID "Clang")
4 | set(CMAKE_CXX_COMPILER_VERSION "")
5 | set(CMAKE_CXX_COMPILER_WRAPPER "")
6 | set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT "")
7 | set(CMAKE_CXX_COMPILE_FEATURES "")
8 | set(CMAKE_CXX98_COMPILE_FEATURES "")
9 | set(CMAKE_CXX11_COMPILE_FEATURES "")
10 | set(CMAKE_CXX14_COMPILE_FEATURES "")
11 |
12 | set(CMAKE_CXX_PLATFORM_ID "")
13 | set(CMAKE_CXX_SIMULATE_ID "")
14 | set(CMAKE_CXX_SIMULATE_VERSION "")
15 |
16 | set(CMAKE_AR "/Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-ar")
17 | set(CMAKE_RANLIB "/Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-ranlib")
18 | set(CMAKE_LINKER "/Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-ld")
19 | set(CMAKE_COMPILER_IS_GNUCXX )
20 | set(CMAKE_CXX_COMPILER_LOADED 1)
21 | set(CMAKE_CXX_COMPILER_WORKS TRUE)
22 | set(CMAKE_CXX_ABI_COMPILED TRUE)
23 | set(CMAKE_COMPILER_IS_MINGW )
24 | set(CMAKE_COMPILER_IS_CYGWIN )
25 | if(CMAKE_COMPILER_IS_CYGWIN)
26 | set(CYGWIN 1)
27 | set(UNIX 1)
28 | endif()
29 |
30 | set(CMAKE_CXX_COMPILER_ENV_VAR "CXX")
31 |
32 | if(CMAKE_COMPILER_IS_MINGW)
33 | set(MINGW 1)
34 | endif()
35 | set(CMAKE_CXX_COMPILER_ID_RUN 1)
36 | set(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC)
37 | set(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;mm;CPP)
38 | set(CMAKE_CXX_LINKER_PREFERENCE 30)
39 | set(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1)
40 |
41 | # Save compiler ABI information.
42 | set(CMAKE_CXX_SIZEOF_DATA_PTR "4")
43 | set(CMAKE_CXX_COMPILER_ABI "ELF")
44 | set(CMAKE_CXX_LIBRARY_ARCHITECTURE "")
45 |
46 | if(CMAKE_CXX_SIZEOF_DATA_PTR)
47 | set(CMAKE_SIZEOF_VOID_P "${CMAKE_CXX_SIZEOF_DATA_PTR}")
48 | endif()
49 |
50 | if(CMAKE_CXX_COMPILER_ABI)
51 | set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_CXX_COMPILER_ABI}")
52 | endif()
53 |
54 | if(CMAKE_CXX_LIBRARY_ARCHITECTURE)
55 | set(CMAKE_LIBRARY_ARCHITECTURE "")
56 | endif()
57 |
58 | set(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX "")
59 | if(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX)
60 | set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_CXX_CL_SHOWINCLUDES_PREFIX}")
61 | endif()
62 |
63 |
64 |
65 |
66 | set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "stdc++;m;dl;c;dl")
67 | set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "/Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/lib/gcc/arm-linux-androideabi/4.9.x;/Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/arm-linux-androideabi/lib;/Users/guolei/Library/Android/sdk/ndk-bundle/platforms/android-19/arch-arm/usr/lib")
68 | set(CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "")
69 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_so/.externalNativeBuild/cmake/release/armeabi/CMakeFiles/3.6.0-rc2/CMakeDetermineCompilerABI_C.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/plugin_about/plugin_so/.externalNativeBuild/cmake/release/armeabi/CMakeFiles/3.6.0-rc2/CMakeDetermineCompilerABI_C.bin
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_so/.externalNativeBuild/cmake/release/armeabi/CMakeFiles/3.6.0-rc2/CMakeDetermineCompilerABI_CXX.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/plugin_about/plugin_so/.externalNativeBuild/cmake/release/armeabi/CMakeFiles/3.6.0-rc2/CMakeDetermineCompilerABI_CXX.bin
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_so/.externalNativeBuild/cmake/release/armeabi/CMakeFiles/3.6.0-rc2/CMakeSystem.cmake:
--------------------------------------------------------------------------------
1 | set(CMAKE_HOST_SYSTEM "Darwin-15.6.0")
2 | set(CMAKE_HOST_SYSTEM_NAME "Darwin")
3 | set(CMAKE_HOST_SYSTEM_VERSION "15.6.0")
4 | set(CMAKE_HOST_SYSTEM_PROCESSOR "x86_64")
5 |
6 | include("/Users/guolei/Library/Android/sdk/ndk-bundle/build/cmake/android.toolchain.cmake")
7 |
8 | set(CMAKE_SYSTEM "Android-19")
9 | set(CMAKE_SYSTEM_NAME "Android")
10 | set(CMAKE_SYSTEM_VERSION "19")
11 | set(CMAKE_SYSTEM_PROCESSOR "armv5te")
12 |
13 | set(CMAKE_CROSSCOMPILING "TRUE")
14 |
15 | set(CMAKE_SYSTEM_LOADED 1)
16 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_so/.externalNativeBuild/cmake/release/armeabi/CMakeFiles/TargetDirectories.txt:
--------------------------------------------------------------------------------
1 | /Users/guolei/AndroidStudioProjects/Demo/plugin_so/.externalNativeBuild/cmake/release/armeabi/CMakeFiles/edit_cache.dir
2 | /Users/guolei/AndroidStudioProjects/Demo/plugin_so/.externalNativeBuild/cmake/release/armeabi/CMakeFiles/rebuild_cache.dir
3 | /Users/guolei/AndroidStudioProjects/Demo/plugin_so/.externalNativeBuild/cmake/release/armeabi/CMakeFiles/native-lib.dir
4 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_so/.externalNativeBuild/cmake/release/armeabi/CMakeFiles/cmake.check_cache:
--------------------------------------------------------------------------------
1 | # This file is generated by cmake for dependency checking of the CMakeCache.txt file
2 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_so/.externalNativeBuild/cmake/release/armeabi/CMakeFiles/native-lib.dir/src/main/cpp/native-lib.cpp.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/plugin_about/plugin_so/.externalNativeBuild/cmake/release/armeabi/CMakeFiles/native-lib.dir/src/main/cpp/native-lib.cpp.o
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_so/.externalNativeBuild/cmake/release/armeabi/android_gradle_build.json:
--------------------------------------------------------------------------------
1 |
2 | {
3 | "buildFiles" : [ "/Users/guolei/AndroidStudioProjects/Demo/plugin_so/CMakeLists.txt" ],
4 | "cleanCommands" :
5 | [
6 | "/Users/guolei/Library/Android/sdk/cmake/3.6.3155560/bin/cmake --build /Users/guolei/AndroidStudioProjects/Demo/plugin_so/.externalNativeBuild/cmake/release/armeabi --target clean"
7 | ],
8 | "cppFileExtensions" : [ "cpp" ],
9 | "libraries" :
10 | {
11 | "native-lib-Release-armeabi" :
12 | {
13 | "abi" : "armeabi",
14 | "artifactName" : "native-lib",
15 | "buildCommand" : "/Users/guolei/Library/Android/sdk/cmake/3.6.3155560/bin/cmake --build /Users/guolei/AndroidStudioProjects/Demo/plugin_so/.externalNativeBuild/cmake/release/armeabi --target native-lib",
16 | "buildType" : "release",
17 | "files" :
18 | [
19 |
20 | {
21 | "flags" : " -target armv5te-none-linux-androideabi -gcc-toolchain /Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64 --sysroot=/Users/guolei/Library/Android/sdk/ndk-bundle/platforms/android-19/arch-arm -Dnative_lib_EXPORTS -isystem /Users/guolei/Library/Android/sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include -isystem /Users/guolei/Library/Android/sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi/include -isystem /Users/guolei/Library/Android/sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include/backward -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -march=armv5te -mtune=xscale -msoft-float -fno-integrated-as -mthumb -Wa,--noexecstack -Wformat -Werror=format-security -fno-exceptions -fno-rtti -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -march=armv5te -mtune=xscale -msoft-float -fno-integrated-as -mthumb -Wa,--noexecstack -Wformat -Werror=format-security -fno-exceptions -fno-rtti -Os -DNDEBUG -Os -DNDEBUG -fPIC -c ",
22 | "src" : "/Users/guolei/AndroidStudioProjects/Demo/plugin_so/src/main/cpp/native-lib.cpp",
23 | "workingDirectory" : "/Users/guolei/AndroidStudioProjects/Demo/plugin_so/.externalNativeBuild/cmake/release/armeabi"
24 | }
25 | ],
26 | "output" : "/Users/guolei/AndroidStudioProjects/Demo/plugin_so/build/intermediates/cmake/release/obj/armeabi/libnative-lib.so",
27 | "toolchain" : "14328697835032828871"
28 | }
29 | },
30 | "toolchains" :
31 | {
32 | "14328697835032828871" :
33 | {
34 | "cCompilerExecutable" : "/Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang",
35 | "cppCompilerExecutable" : "/Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++"
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_so/.externalNativeBuild/cmake/release/armeabi/cmake_build_command.txt:
--------------------------------------------------------------------------------
1 | Executable : /Users/guolei/Library/Android/sdk/cmake/3.6.3155560/bin/cmake
2 | arguments :
3 | -H/Users/guolei/AndroidStudioProjects/Demo/plugin_so
4 | -B/Users/guolei/AndroidStudioProjects/Demo/plugin_so/.externalNativeBuild/cmake/release/armeabi
5 | -GAndroid Gradle - Ninja
6 | -DANDROID_ABI=armeabi
7 | -DANDROID_NDK=/Users/guolei/Library/Android/sdk/ndk-bundle
8 | -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/Users/guolei/AndroidStudioProjects/Demo/plugin_so/build/intermediates/cmake/release/obj/armeabi
9 | -DCMAKE_BUILD_TYPE=Release
10 | -DCMAKE_MAKE_PROGRAM=/Users/guolei/Library/Android/sdk/cmake/3.6.3155560/bin/ninja
11 | -DCMAKE_TOOLCHAIN_FILE=/Users/guolei/Library/Android/sdk/ndk-bundle/build/cmake/android.toolchain.cmake
12 | -DANDROID_PLATFORM=android-19
13 | -DCMAKE_CXX_FLAGS=
14 | jvmArgs :
15 |
16 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_so/.externalNativeBuild/cmake/release/armeabi/cmake_build_output.txt:
--------------------------------------------------------------------------------
1 | -- Check for working C compiler: /Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang
2 | -- Check for working C compiler: /Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang -- works
3 | -- Detecting C compiler ABI info
4 | -- Detecting C compiler ABI info - done
5 | -- Detecting C compile features
6 | -- Detecting C compile features - done
7 | -- Check for working CXX compiler: /Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++
8 | -- Check for working CXX compiler: /Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ -- works
9 | -- Detecting CXX compiler ABI info
10 | -- Detecting CXX compiler ABI info - done
11 | -- Detecting CXX compile features
12 | -- Detecting CXX compile features - done
13 | -- Configuring done
14 | -- Generating done
15 | -- Build files have been written to: /Users/guolei/AndroidStudioProjects/Demo/plugin_so/.externalNativeBuild/cmake/release/armeabi
16 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_so/.externalNativeBuild/cmake/release/armeabi/cmake_install.cmake:
--------------------------------------------------------------------------------
1 | # Install script for directory: /Users/guolei/AndroidStudioProjects/Demo/plugin_so
2 |
3 | # Set the install prefix
4 | if(NOT DEFINED CMAKE_INSTALL_PREFIX)
5 | set(CMAKE_INSTALL_PREFIX "/usr/local")
6 | endif()
7 | string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
8 |
9 | # Set the install configuration name.
10 | if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
11 | if(BUILD_TYPE)
12 | string(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
13 | CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
14 | else()
15 | set(CMAKE_INSTALL_CONFIG_NAME "Release")
16 | endif()
17 | message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
18 | endif()
19 |
20 | # Set the component getting installed.
21 | if(NOT CMAKE_INSTALL_COMPONENT)
22 | if(COMPONENT)
23 | message(STATUS "Install component: \"${COMPONENT}\"")
24 | set(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
25 | else()
26 | set(CMAKE_INSTALL_COMPONENT)
27 | endif()
28 | endif()
29 |
30 | # Install shared libraries without execute permission?
31 | if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE)
32 | set(CMAKE_INSTALL_SO_NO_EXE "0")
33 | endif()
34 |
35 | if(CMAKE_INSTALL_COMPONENT)
36 | set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt")
37 | else()
38 | set(CMAKE_INSTALL_MANIFEST "install_manifest.txt")
39 | endif()
40 |
41 | string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT
42 | "${CMAKE_INSTALL_MANIFEST_FILES}")
43 | file(WRITE "/Users/guolei/AndroidStudioProjects/Demo/plugin_so/.externalNativeBuild/cmake/release/armeabi/${CMAKE_INSTALL_MANIFEST}"
44 | "${CMAKE_INSTALL_MANIFEST_CONTENT}")
45 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_so/.externalNativeBuild/cmake/release/armeabi/rules.ninja:
--------------------------------------------------------------------------------
1 | # CMAKE generated file: DO NOT EDIT!
2 | # Generated by "Ninja" Generator, CMake Version 3.6
3 |
4 | # This file contains all the rules used to get the outputs files
5 | # built from the input files.
6 | # It is included in the main 'build.ninja'.
7 |
8 | # =============================================================================
9 | # Project: Project
10 | # Configuration: Release
11 | # =============================================================================
12 | # =============================================================================
13 |
14 | #############################################
15 | # Rule for running custom commands.
16 |
17 | rule CUSTOM_COMMAND
18 | command = $COMMAND
19 | description = $DESC
20 |
21 |
22 | #############################################
23 | # Rule for compiling CXX files.
24 |
25 | rule CXX_COMPILER__native-lib
26 | depfile = $DEP_FILE
27 | deps = gcc
28 | command = /Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ -target armv5te-none-linux-androideabi -gcc-toolchain /Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64 --sysroot=/Users/guolei/Library/Android/sdk/ndk-bundle/platforms/android-19/arch-arm $DEFINES $INCLUDES $FLAGS -MD -MT $out -MF $DEP_FILE -o $out -c $IN_ABS
29 | description = Building CXX object $out
30 |
31 |
32 | #############################################
33 | # Rule for linking CXX shared library.
34 |
35 | rule CXX_SHARED_LIBRARY_LINKER__native-lib
36 | command = $PRE_LINK && /Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ -target armv5te-none-linux-androideabi -gcc-toolchain /Users/guolei/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64 --sysroot=/Users/guolei/Library/Android/sdk/ndk-bundle/platforms/android-19/arch-arm -fPIC $LANGUAGE_COMPILE_FLAGS $ARCH_FLAGS $LINK_FLAGS -shared $SONAME_FLAG$SONAME -o $TARGET_FILE $in $LINK_PATH $LINK_LIBRARIES && $POST_BUILD
37 | description = Linking CXX shared library $TARGET_FILE
38 | restat = $RESTAT
39 |
40 |
41 | #############################################
42 | # Rule for re-running cmake.
43 |
44 | rule RERUN_CMAKE
45 | command = /Users/guolei/Library/Android/sdk/cmake/3.6.3155560/bin/cmake -H/Users/guolei/AndroidStudioProjects/Demo/plugin_so -B/Users/guolei/AndroidStudioProjects/Demo/plugin_so/.externalNativeBuild/cmake/release/armeabi
46 | description = Re-running CMake...
47 | generator = 1
48 |
49 |
50 | #############################################
51 | # Rule for cleaning all built files.
52 |
53 | rule CLEAN
54 | command = /Users/guolei/Library/Android/sdk/cmake/3.6.3155560/bin/ninja -t clean
55 | description = Cleaning all built files...
56 |
57 |
58 | #############################################
59 | # Rule for printing all primary targets available.
60 |
61 | rule HELP
62 | command = /Users/guolei/Library/Android/sdk/cmake/3.6.3155560/bin/ninja -t targets
63 | description = All primary targets available:
64 |
65 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_so/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_so/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # For more information about using CMake with Android Studio, read the
2 | # documentation: https://d.android.com/studio/projects/add-native-code.html
3 |
4 | # Sets the minimum version of CMake required to build the native library.
5 |
6 | cmake_minimum_required(VERSION 3.4.1)
7 |
8 |
9 | # Creates and names a library, sets it as either STATIC
10 | # or SHARED, and provides the relative paths to its source code.
11 | # You can define multiple libraries, and CMake builds them for you.
12 | # Gradle automatically packages shared libraries with your APK.
13 |
14 | add_library( # Sets the name of the library.
15 | native-lib
16 |
17 | # Sets the library as a shared library.
18 | SHARED
19 |
20 | # Provides a relative path to your source file(s).
21 | src/main/cpp/native-lib.cpp
22 | )
23 |
24 | # Searches for a specified prebuilt library and stores the path as a
25 | # variable. Because CMake includes system libraries in the search path by
26 | # default, you only need to specify the name of the public NDK library
27 | # you want to add. CMake verifies that the library exists before
28 | # completing its build.
29 |
30 | find_library( # Sets the name of the path variable.
31 | log-lib
32 |
33 | # Specifies the name of the NDK library that
34 | # you want CMake to locate.
35 | log )
36 |
37 | # Specifies libraries CMake should link to your target library. You
38 | # can link multiple libraries, such as libraries you define in this
39 | # build script, prebuilt third-party libraries, or system libraries.
40 |
41 | target_link_libraries( # Specifies the target library.
42 | native-lib
43 |
44 | # Links the target library to the log library
45 | # included in the NDK.
46 | ${log-lib}
47 | )
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_so/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 | apply plugin: 'com.didi.virtualapk.plugin'
3 |
4 | android {
5 | compileSdkVersion 26
6 | buildToolsVersion "26.0.2"
7 |
8 |
9 | defaultConfig {
10 | applicationId "com.guolei.plugin_so"
11 | minSdkVersion 19
12 | targetSdkVersion 26
13 | versionCode 1
14 | versionName "1.0"
15 |
16 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
17 |
18 | externalNativeBuild {
19 | cmake {
20 | cppFlags ""
21 | }
22 | }
23 | ndk {
24 | abiFilters 'armeabi'
25 | }
26 | }
27 |
28 | buildTypes {
29 | release {
30 | minifyEnabled false
31 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
32 | }
33 | }
34 | externalNativeBuild {
35 | cmake {
36 | path "CMakeLists.txt"
37 | }
38 | }
39 |
40 | }
41 |
42 | virtualApk {
43 | packageId = 0x6e // The package id of Resources.
44 | targetHost='plugindemo' // The path of application module in host project.
45 | applyHostMapping = true // [Optional] Default value is true.
46 | }
47 |
48 | dependencies {
49 | compile fileTree(dir: 'libs', include: ['*.jar'])
50 | compile 'com.android.support:appcompat-v7:26.1.0'
51 | compile 'com.android.support.constraint:constraint-layout:1.0.2'
52 | testCompile 'junit:junit:4.12'
53 | androidTestCompile('com.android.support.test.espresso:espresso-core:3.0.1', {
54 | exclude group: 'com.android.support', module: 'support-annotations'
55 | })
56 |
57 | }
58 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_so/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_so/src/androidTest/java/com/guolei/plugin_so/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.guolei.plugin_so;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumented test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() throws Exception {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.guolei.plugin_so", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_so/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_so/src/main/cpp/native-lib.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 |
4 |
5 | extern "C"
6 | JNIEXPORT jstring
7 | JNICALL
8 | Java_com_guolei_so_MainActivity_stringFromJNI(
9 | JNIEnv *env,
10 | jobject /* this */) {
11 | std::string hello = "Hello from plugin so";
12 | return env->NewStringUTF(hello.c_str());
13 | }
14 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_so/src/main/java/com/guolei/so/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.guolei.so;
2 |
3 | import android.support.v7.app.AppCompatActivity;
4 | import android.os.Bundle;
5 | import android.widget.TextView;
6 |
7 | import com.guolei.plugin_so.R;
8 |
9 | public class MainActivity extends AppCompatActivity {
10 |
11 | static {
12 | System.loadLibrary("native-lib");
13 | }
14 |
15 | @Override
16 | protected void onCreate(Bundle savedInstanceState) {
17 | super.onCreate(savedInstanceState);
18 | setContentView(R.layout.activity_plugin);
19 | ((TextView)findViewById(R.id.plugin_so_text)).setText(stringFromJNI());
20 | }
21 |
22 | public native String stringFromJNI();
23 | }
24 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_so/src/main/res/drawable-v24/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
12 |
13 |
19 |
22 |
25 |
26 |
27 |
28 |
34 |
35 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_so/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_so/src/main/res/layout/activity_plugin.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_so/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_so/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_so/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/plugin_about/plugin_so/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_so/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/plugin_about/plugin_so/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_so/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/plugin_about/plugin_so/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_so/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/plugin_about/plugin_so/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_so/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/plugin_about/plugin_so/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_so/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/plugin_about/plugin_so/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_so/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/plugin_about/plugin_so/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_so/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/plugin_about/plugin_so/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_so/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/plugin_about/plugin_so/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_so/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/plugin_about/plugin_so/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_so/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_so/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | plugin_so
3 |
4 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_so/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugin_so/src/test/java/com/guolei/plugin_so/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.guolei.plugin_so;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() throws Exception {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/source_code/plugin_about/plugindemo-release-unsigned.apk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/plugin_about/plugindemo-release-unsigned.apk
--------------------------------------------------------------------------------
/source_code/plugin_about/plugindemo/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugindemo/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 | apply plugin: 'com.didi.virtualapk.host'
3 |
4 | android {
5 | compileSdkVersion 26
6 | buildToolsVersion "26.0.2"
7 |
8 |
9 | defaultConfig {
10 | applicationId "com.guolei.plugindemo"
11 | minSdkVersion 19
12 | targetSdkVersion 26
13 | versionCode 1
14 | versionName "1.0"
15 | multiDexEnabled true
16 |
17 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
18 |
19 | }
20 |
21 | buildTypes {
22 | release {
23 | minifyEnabled false
24 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
25 | }
26 | }
27 |
28 | lintOptions {
29 | abortOnError false
30 | }
31 | }
32 |
33 | dependencies {
34 | compile fileTree(include: ['*.jar'], dir: 'libs')
35 | compile 'com.android.support:appcompat-v7:26.1.0'
36 | compile 'com.android.support.constraint:constraint-layout:1.0.2'
37 | testCompile 'junit:junit:4.12'
38 | androidTestCompile('com.android.support.test.espresso:espresso-core:3.0.1', {
39 | exclude group: 'com.android.support', module: 'support-annotations'
40 | })
41 | compile 'com.android.support:multidex:1.0.1'
42 | // provided project(':pluginstub')
43 | }
44 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugindemo/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugindemo/src/androidTest/java/com/guolei/plugindemo/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.guolei.plugindemo;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumented test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() throws Exception {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.guolei.plugindemo", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugindemo/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugindemo/src/main/java/com/guolei/plugindemo/Constants.java:
--------------------------------------------------------------------------------
1 | package com.guolei.plugindemo;
2 |
3 | // _ _ _ _
4 | //__ _____ _ __| | _| |_(_) | ___
5 | //\ \ /\ / / _ \| '__| |/ / __| | |/ _ \
6 | // \ V V / (_) | | | <| |_| | | __/
7 | // \_/\_/ \___/|_| |_|\_\\__|_|_|\___|
8 |
9 |
10 | import java.lang.reflect.InvocationTargetException;
11 | import java.lang.reflect.Method;
12 |
13 | /**
14 | * Copyright © 2013-2017 Worktile. All Rights Reserved.
15 | * Author: guolei
16 | * Email: 1120832563@qq.com
17 | * Date: 18/3/9
18 | * Time: 下午1:32
19 | * Desc:
20 | */
21 | public class Constants {
22 | public static final String TAG = "plugin";
23 | public static final String TARGET_ACTIVITY = "target_activity";
24 | public static final String TARGET_SERVICE = "target_service";
25 |
26 | /**
27 | * 或者通过 {@link android.os.Build#SUPPORTED_ABIS}
28 | *
29 | * @return
30 | */
31 | public static boolean isDalvik() {
32 | String SELECT_RUNTIME_PROPERTY = "persist.sys.dalvik.vm.lib";
33 | String LIB_DALVIK = "libdvm.so";
34 | String LIB_ART = "libart.so";
35 | String LIB_ART_D = "libartd.so";
36 | try {
37 | Class> systemProperties = Class.forName("android.os.SystemProperties");
38 | try {
39 | Method get = systemProperties.getMethod("get",
40 | String.class, String.class);
41 | if (get == null) {
42 | return false;
43 | }
44 | try {
45 | final String value = (String) get.invoke(
46 | systemProperties, SELECT_RUNTIME_PROPERTY,
47 | /* Assuming default is */"Dalvik");
48 | if (LIB_DALVIK.equals(value)) {
49 | return true;
50 | }
51 | return false;
52 | } catch (Exception e) {
53 | return false;
54 | }
55 | } catch (NoSuchMethodException e) {
56 | return false;
57 | }
58 | } catch (ClassNotFoundException e) {
59 | return false;
60 | }
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugindemo/src/main/java/com/guolei/plugindemo/DelegateContentProvider.java:
--------------------------------------------------------------------------------
1 | package com.guolei.plugindemo;
2 |
3 | import android.content.ContentProvider;
4 | import android.content.ContentValues;
5 | import android.database.Cursor;
6 | import android.net.Uri;
7 | import android.support.annotation.NonNull;
8 | import android.support.annotation.Nullable;
9 | import android.util.Log;
10 |
11 |
12 | // _ _ _ _
13 | //__ _____ _ __| | _| |_(_) | ___
14 | //\ \ /\ / / _ \| '__| |/ / __| | |/ _ \
15 | // \ V V / (_) | | | <| |_| | | __/
16 | // \_/\_/ \___/|_| |_|\_\\__|_|_|\___|
17 |
18 |
19 | /**
20 | * Copyright © 2013-2017 Worktile. All Rights Reserved.
21 | * Author: guolei
22 | * Email: 1120832563@qq.com
23 | * Date: 18/3/27
24 | * Time: 下午5:04
25 | * Desc:
26 | */
27 | public class DelegateContentProvider extends ContentProvider {
28 | @Override
29 | public boolean onCreate() {
30 | return true;
31 | }
32 |
33 | @Nullable
34 | @Override
35 | public Cursor query(@NonNull Uri uri, @Nullable String[] projection, @Nullable String selection, @Nullable String[] selectionArgs, @Nullable String sortOrder) {
36 | //content://com.guolei.delegate.content/com.guolei.plugin_1.provider
37 | if (uri.getPath() != null) {
38 | return getContext().getContentResolver().query(Uri.parse("content://" + uri.getPath().substring(1)),
39 | projection, selection, selectionArgs, sortOrder);
40 | } else {
41 | Log.e("plugin", "query: " + "delegate");
42 | return null;
43 | }
44 | }
45 |
46 | @Nullable
47 | @Override
48 | public String getType(@NonNull Uri uri) {
49 | return null;
50 | }
51 |
52 | @Nullable
53 | @Override
54 | public Uri insert(@NonNull Uri uri, @Nullable ContentValues values) {
55 | return null;
56 | }
57 |
58 | @Override
59 | public int delete(@NonNull Uri uri, @Nullable String selection, @Nullable String[] selectionArgs) {
60 | return 0;
61 | }
62 |
63 | @Override
64 | public int update(@NonNull Uri uri, @Nullable ContentValues values, @Nullable String selection, @Nullable String[] selectionArgs) {
65 | return 0;
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugindemo/src/main/java/com/guolei/plugindemo/TestService.java:
--------------------------------------------------------------------------------
1 | package com.guolei.plugindemo;
2 |
3 | // _ _ _ _
4 | //__ _____ _ __| | _| |_(_) | ___
5 | //\ \ /\ / / _ \| '__| |/ / __| | |/ _ \
6 | // \ V V / (_) | | | <| |_| | | __/
7 | // \_/\_/ \___/|_| |_|\_\\__|_|_|\___|
8 |
9 |
10 | import android.app.Service;
11 | import android.content.Intent;
12 | import android.os.IBinder;
13 | import android.support.annotation.Nullable;
14 | import android.util.Log;
15 |
16 | import static com.guolei.plugindemo.Constants.TAG;
17 |
18 | /**
19 | * Copyright © 2013-2017 Worktile. All Rights Reserved.
20 | * Author: guolei
21 | * Email: 1120832563@qq.com
22 | * Date: 18/3/9
23 | * Time: 下午2:23
24 | * Desc:
25 | */
26 | public class TestService extends Service {
27 | @Nullable
28 | @Override
29 | public IBinder onBind(Intent intent) {
30 | return null;
31 | }
32 |
33 | @Override
34 | public void onCreate() {
35 | super.onCreate();
36 | Log.e(TAG, "未注册 service onCreate: ");
37 | }
38 |
39 | @Override
40 | public int onStartCommand(Intent intent, int flags, int startId) {
41 | Log.e(TAG, "service onStartCommand: ");
42 | return super.onStartCommand(intent, flags, startId);
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugindemo/src/main/java/com/guolei/plugindemo/TwoActivity.java:
--------------------------------------------------------------------------------
1 | package com.guolei.plugindemo;
2 |
3 | import android.support.v7.app.AppCompatActivity;
4 | import android.os.Bundle;
5 |
6 | public class TwoActivity extends AppCompatActivity {
7 |
8 | @Override
9 | protected void onCreate(Bundle savedInstanceState) {
10 | super.onCreate(savedInstanceState);
11 | setContentView(R.layout.activity_two);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugindemo/src/main/java/com/guolei/plugindemo/binderhook/BinderHookHandler.java:
--------------------------------------------------------------------------------
1 | package com.guolei.plugindemo.binderhook;
2 |
3 | // _ _ _ _
4 | //__ _____ _ __| | _| |_(_) | ___
5 | //\ \ /\ / / _ \| '__| |/ / __| | |/ _ \
6 | // \ V V / (_) | | | <| |_| | | __/
7 | // \_/\_/ \___/|_| |_|\_\\__|_|_|\___|
8 |
9 |
10 | import android.annotation.TargetApi;
11 | import android.content.ClipData;
12 | import android.os.Build;
13 | import android.os.IBinder;
14 | import android.util.Log;
15 |
16 | import java.lang.reflect.InvocationHandler;
17 | import java.lang.reflect.Method;
18 |
19 | /**
20 | * Copyright © 2013-2017 Worktile. All Rights Reserved.
21 | * Author: guolei
22 | * Email: 1120832563@qq.com
23 | * Date: 18/3/8
24 | * Time: 下午9:18
25 | * Desc:
26 | */
27 | public class BinderHookHandler implements InvocationHandler {
28 |
29 | private static final String TAG = "BinderHookHandler";
30 |
31 | // 原始的Service对象 (IInterface)
32 | Object base;
33 |
34 | public BinderHookHandler(IBinder base, Class> stubClass) {
35 | try {
36 | Method asInterfaceMethod = stubClass.getDeclaredMethod("asInterface", IBinder.class);
37 | // IClipboard.Stub.asInterface(base);
38 | this.base = asInterfaceMethod.invoke(null, base);
39 | } catch (Exception e) {
40 | throw new RuntimeException("hooked failed!");
41 | }
42 | }
43 |
44 | @TargetApi(Build.VERSION_CODES.HONEYCOMB)
45 | @Override
46 | public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
47 |
48 | // 把剪切版的内容替换为 "you are hooked"
49 | if ("getPrimaryClip".equals(method.getName())) {
50 | Log.d(TAG, "hook getPrimaryClip");
51 | return ClipData.newPlainText(null, "you are hooked");
52 | }
53 |
54 | // 欺骗系统,使之认为剪切版上一直有内容
55 | if ("hasPrimaryClip".equals(method.getName())) {
56 | return true;
57 | }
58 |
59 | return method.invoke(base, args);
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugindemo/src/main/java/com/guolei/plugindemo/core/ActivityManagerProxy.java:
--------------------------------------------------------------------------------
1 | package com.guolei.plugindemo.core;
2 |
3 | // _ _ _ _
4 | //__ _____ _ __| | _| |_(_) | ___
5 | //\ \ /\ / / _ \| '__| |/ / __| | |/ _ \
6 | // \ V V / (_) | | | <| |_| | | __/
7 | // \_/\_/ \___/|_| |_|\_\\__|_|_|\___|
8 |
9 |
10 | import android.content.Context;
11 | import android.content.Intent;
12 | import android.content.pm.PackageManager;
13 | import android.content.pm.ResolveInfo;
14 | import android.util.Log;
15 |
16 | import java.lang.reflect.InvocationHandler;
17 | import java.lang.reflect.Method;
18 | import java.security.PrivilegedAction;
19 | import java.util.List;
20 |
21 | import static com.guolei.plugindemo.Constants.TAG;
22 | import static com.guolei.plugindemo.Constants.TARGET_SERVICE;
23 |
24 | /**
25 | * Copyright © 2013-2017 Worktile. All Rights Reserved.
26 | * Author: guolei
27 | * Email: 1120832563@qq.com
28 | * Date: 18/3/9
29 | * Time: 下午2:33
30 | * Desc:
31 | */
32 | public class ActivityManagerProxy implements InvocationHandler {
33 |
34 | private PackageManager mPackageManager;
35 | private Object mOrigin;
36 |
37 | public ActivityManagerProxy(PackageManager packageManager, Object o) {
38 | mPackageManager = packageManager;
39 | mOrigin = o;
40 | }
41 |
42 | @Override
43 | public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
44 | if (method.getName().equals("startService")) {
45 | Intent intent = (Intent) args[1];
46 | List infos = mPackageManager.queryIntentServices(intent, PackageManager.MATCH_ALL);
47 | if (infos == null || infos.size() == 0) {
48 | intent.putExtra(TARGET_SERVICE, intent.getComponent().getClassName());
49 | intent.setClassName("com.guolei.plugindemo", "com.guolei.plugindemo.StubService");
50 | }
51 |
52 | }
53 | return method.invoke(mOrigin, args);
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugindemo/src/main/res/drawable-v24/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
12 |
13 |
19 |
22 |
25 |
26 |
27 |
28 |
34 |
35 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugindemo/src/main/res/layout/activity_two.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
14 |
15 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugindemo/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugindemo/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugindemo/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/plugin_about/plugindemo/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/source_code/plugin_about/plugindemo/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/plugin_about/plugindemo/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/source_code/plugin_about/plugindemo/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/plugin_about/plugindemo/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/source_code/plugin_about/plugindemo/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/plugin_about/plugindemo/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/source_code/plugin_about/plugindemo/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/plugin_about/plugindemo/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/source_code/plugin_about/plugindemo/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/plugin_about/plugindemo/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/source_code/plugin_about/plugindemo/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/plugin_about/plugindemo/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/source_code/plugin_about/plugindemo/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/plugin_about/plugindemo/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/source_code/plugin_about/plugindemo/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/plugin_about/plugindemo/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/source_code/plugin_about/plugindemo/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/plugin_about/plugindemo/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/source_code/plugin_about/plugindemo/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugindemo/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | PluginDemo
3 |
4 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugindemo/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/source_code/plugin_about/plugindemo/src/test/java/com/guolei/plugindemo/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.guolei.plugindemo;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() throws Exception {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/source_code/plugin_about/simpledex.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/plugin_about/simpledex.jar
--------------------------------------------------------------------------------
/source_code/simplerecyclerviewadapter/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/source_code/simplerecyclerviewadapter/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 25
5 | buildToolsVersion "25.0.2"
6 |
7 |
8 | defaultConfig {
9 | applicationId "guolei.com.simplerecyclerviewadapter"
10 | minSdkVersion 19
11 | targetSdkVersion 25
12 | versionCode 1
13 | versionName "1.0"
14 |
15 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
16 |
17 | }
18 |
19 | buildTypes {
20 | release {
21 | minifyEnabled false
22 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
23 | }
24 | }
25 |
26 | }
27 |
28 | dependencies {
29 | compile fileTree(include: ['*.jar'], dir: 'libs')
30 | compile 'com.android.support:appcompat-v7:25.4.0'
31 | compile 'com.android.support.constraint:constraint-layout:1.0.2'
32 | compile 'com.android.support:recyclerview-v7:25.4.0'
33 | }
34 |
--------------------------------------------------------------------------------
/source_code/simplerecyclerviewadapter/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/source_code/simplerecyclerviewadapter/src/androidTest/java/guolei/com/simplerecyclerviewadapter/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package guolei.com.simplerecyclerviewadapter;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumented test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() throws Exception {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("guolei.com.simplerecyclerviewadapter", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/source_code/simplerecyclerviewadapter/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/source_code/simplerecyclerviewadapter/src/main/java/guolei/com/simplerecyclerviewadapter/Item1.java:
--------------------------------------------------------------------------------
1 | package guolei.com.simplerecyclerviewadapter;
2 |
3 | // _ _ _ _
4 | //__ _____ _ __| | _| |_(_) | ___
5 | //\ \ /\ / / _ \| '__| |/ / __| | |/ _ \
6 | // \ V V / (_) | | | <| |_| | | __/
7 | // \_/\_/ \___/|_| |_|\_\\__|_|_|\___|
8 |
9 |
10 | import android.view.View;
11 | import android.widget.TextView;
12 |
13 | import simpleadapter.BaseItem;
14 |
15 | /**
16 | * Copyright © 2013-2017 Worktile. All Rights Reserved.
17 | * Author: guolei
18 | * Email: 1120832563@qq.com
19 | * Date: 17/11/21
20 | * Time: 下午11:01
21 | * Desc:
22 | */
23 | public class Item1 extends BaseItem {
24 |
25 | @Override
26 | public int getLayoutId() {
27 | return R.layout.item_1;
28 | }
29 |
30 | @Override
31 | public void bindValue(View view) {
32 | ((TextView)view.findViewById(R.id.tv)).setText("item 1");
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/source_code/simplerecyclerviewadapter/src/main/java/guolei/com/simplerecyclerviewadapter/Item2.java:
--------------------------------------------------------------------------------
1 | package guolei.com.simplerecyclerviewadapter;
2 |
3 | // _ _ _ _
4 | //__ _____ _ __| | _| |_(_) | ___
5 | //\ \ /\ / / _ \| '__| |/ / __| | |/ _ \
6 | // \ V V / (_) | | | <| |_| | | __/
7 | // \_/\_/ \___/|_| |_|\_\\__|_|_|\___|
8 |
9 |
10 | import android.view.View;
11 | import android.widget.TextView;
12 |
13 | import simpleadapter.BaseItem;
14 |
15 | /**
16 | * Copyright © 2013-2017 Worktile. All Rights Reserved.
17 | * Author: guolei
18 | * Email: 1120832563@qq.com
19 | * Date: 17/11/21
20 | * Time: 下午11:01
21 | * Desc:
22 | */
23 | public class Item2 extends BaseItem {
24 |
25 |
26 | @Override
27 | public int getLayoutId() {
28 | return R.layout.item_2;
29 | }
30 |
31 | @Override
32 | public void bindValue(View view) {
33 | ((TextView)view.findViewById(R.id.tv)).setText("item 2");
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/source_code/simplerecyclerviewadapter/src/main/java/guolei/com/simplerecyclerviewadapter/Item3.java:
--------------------------------------------------------------------------------
1 | package guolei.com.simplerecyclerviewadapter;
2 |
3 | // _ _ _ _
4 | //__ _____ _ __| | _| |_(_) | ___
5 | //\ \ /\ / / _ \| '__| |/ / __| | |/ _ \
6 | // \ V V / (_) | | | <| |_| | | __/
7 | // \_/\_/ \___/|_| |_|\_\\__|_|_|\___|
8 |
9 |
10 | import android.view.View;
11 | import android.widget.TextView;
12 |
13 | import simpleadapter.BaseItem;
14 |
15 | /**
16 | * Copyright © 2013-2017 Worktile. All Rights Reserved.
17 | * Author: guolei
18 | * Email: 1120832563@qq.com
19 | * Date: 17/11/21
20 | * Time: 下午11:01
21 | * Desc:
22 | */
23 | public class Item3 extends BaseItem {
24 |
25 |
26 | @Override
27 | public int getLayoutId() {
28 | return R.layout.item_3;
29 | }
30 |
31 | @Override
32 | public void bindValue(View view) {
33 | ((TextView)view.findViewById(R.id.tv)).setText("item 3");
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/source_code/simplerecyclerviewadapter/src/main/java/guolei/com/simplerecyclerviewadapter/ItemEmpty.java:
--------------------------------------------------------------------------------
1 | package guolei.com.simplerecyclerviewadapter;
2 |
3 | // _ _ _ _
4 | //__ _____ _ __| | _| |_(_) | ___
5 | //\ \ /\ / / _ \| '__| |/ / __| | |/ _ \
6 | // \ V V / (_) | | | <| |_| | | __/
7 | // \_/\_/ \___/|_| |_|\_\\__|_|_|\___|
8 |
9 |
10 | import android.view.View;
11 |
12 | import simpleadapter.BaseItem;
13 |
14 | /**
15 | * Copyright © 2013-2017 Worktile. All Rights Reserved.
16 | * Author: guolei
17 | * Email: 1120832563@qq.com
18 | * Date: 17/11/21
19 | * Time: 下午11:01
20 | * Desc:
21 | */
22 | public class ItemEmpty extends BaseItem {
23 |
24 |
25 | @Override
26 | public int getLayoutId() {
27 | return R.layout.item_empty;
28 | }
29 |
30 | @Override
31 | public void bindValue(View view) {
32 |
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/source_code/simplerecyclerviewadapter/src/main/java/guolei/com/simplerecyclerviewadapter/MainActivity.java:
--------------------------------------------------------------------------------
1 | package guolei.com.simplerecyclerviewadapter;
2 |
3 | import android.support.v7.app.AppCompatActivity;
4 | import android.os.Bundle;
5 | import android.support.v7.widget.LinearLayoutManager;
6 | import android.support.v7.widget.RecyclerView;
7 |
8 | import java.util.ArrayList;
9 | import java.util.List;
10 |
11 | import simpleadapter.BaseItem;
12 | import simpleadapter.SimpleRecyclerViewAdapter;
13 |
14 | public class MainActivity extends AppCompatActivity {
15 |
16 | private List mData = new ArrayList<>();
17 |
18 | @Override
19 | protected void onCreate(Bundle savedInstanceState) {
20 | super.onCreate(savedInstanceState);
21 | setContentView(R.layout.activity_main);
22 | generateMockData();
23 | RecyclerView recyclerView = (RecyclerView) findViewById(R.id.recyclerView);
24 | recyclerView.setLayoutManager(new LinearLayoutManager(this));
25 | recyclerView.setAdapter(new SimpleRecyclerViewAdapter(mData));
26 | }
27 |
28 | private void generateMockData() {
29 | mData.add(new Item1());
30 | mData.add(new Item2());
31 | mData.add(new ItemEmpty());
32 | mData.add(new Item3());
33 | mData.add(new Item3());
34 | mData.add(new ItemEmpty());
35 | mData.add(new Item2());
36 | mData.add(new Item1());
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/source_code/simplerecyclerviewadapter/src/main/java/simpleadapter/BaseItem.java:
--------------------------------------------------------------------------------
1 | package simpleadapter;
2 |
3 | // _ _ _ _
4 | //__ _____ _ __| | _| |_(_) | ___
5 | //\ \ /\ / / _ \| '__| |/ / __| | |/ _ \
6 | // \ V V / (_) | | | <| |_| | | __/
7 | // \_/\_/ \___/|_| |_|\_\\__|_|_|\___|
8 |
9 |
10 | import android.view.View;
11 |
12 | /**
13 | * Copyright © 2013-2017 Worktile. All Rights Reserved.
14 | * Author: guolei
15 | * Email: 1120832563@qq.com
16 | * Date: 17/11/21
17 | * Time: 下午10:52
18 | * Desc:
19 | */
20 | public abstract class BaseItem {
21 |
22 | public abstract int getLayoutId();
23 |
24 | public abstract void bindValue(View view);
25 | }
26 |
--------------------------------------------------------------------------------
/source_code/simplerecyclerviewadapter/src/main/java/simpleadapter/BaseViewHolder.java:
--------------------------------------------------------------------------------
1 | package simpleadapter;
2 |
3 | // _ _ _ _
4 | //__ _____ _ __| | _| |_(_) | ___
5 | //\ \ /\ / / _ \| '__| |/ / __| | |/ _ \
6 | // \ V V / (_) | | | <| |_| | | __/
7 | // \_/\_/ \___/|_| |_|\_\\__|_|_|\___|
8 |
9 |
10 | import android.support.v7.widget.RecyclerView;
11 | import android.view.View;
12 |
13 | /**
14 | * Copyright © 2013-2017 Worktile. All Rights Reserved.
15 | * Author: guolei
16 | * Email: 1120832563@qq.com
17 | * Date: 17/11/21
18 | * Time: 下午10:45
19 | * Desc:
20 | */
21 | public class BaseViewHolder extends RecyclerView.ViewHolder{
22 |
23 | private View mView;
24 | public BaseViewHolder(View itemView) {
25 | super(itemView);
26 | mView = itemView;
27 | }
28 |
29 | public View getView() {
30 | return mView;
31 | }
32 |
33 | public void setView(View mView) {
34 | this.mView = mView;
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/source_code/simplerecyclerviewadapter/src/main/java/simpleadapter/SimpleRecyclerViewAdapter.java:
--------------------------------------------------------------------------------
1 | package simpleadapter;
2 |
3 | // _ _ _ _
4 | //__ _____ _ __| | _| |_(_) | ___
5 | //\ \ /\ / / _ \| '__| |/ / __| | |/ _ \
6 | // \ V V / (_) | | | <| |_| | | __/
7 | // \_/\_/ \___/|_| |_|\_\\__|_|_|\___|
8 |
9 |
10 | import android.support.v7.widget.RecyclerView;
11 | import android.view.LayoutInflater;
12 | import android.view.ViewGroup;
13 |
14 | import java.util.List;
15 |
16 | /**
17 | * Copyright © 2013-2017 Worktile. All Rights Reserved.
18 | * Author: guolei
19 | * Email: 1120832563@qq.com
20 | * Date: 17/11/21
21 | * Time: 下午10:45
22 | * Desc:
23 | */
24 | public class SimpleRecyclerViewAdapter extends RecyclerView.Adapter {
25 |
26 | private List mData;
27 | private LayoutInflater mInflater;
28 |
29 | public SimpleRecyclerViewAdapter(List data) {
30 | mData = data;
31 | }
32 |
33 | @Override
34 | public BaseViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
35 | if (mInflater == null) {
36 | mInflater = LayoutInflater.from(parent.getContext());
37 | }
38 | return new BaseViewHolder(mInflater.inflate(viewType, parent, false));
39 | }
40 |
41 |
42 | @Override
43 | public void onBindViewHolder(BaseViewHolder holder, int position) {
44 | mData.get(position).bindValue(holder.getView());
45 | }
46 |
47 | @Override
48 | public int getItemCount() {
49 | return mData != null ? mData.size() : 0;
50 | }
51 |
52 | @Override
53 | public int getItemViewType(int position) {
54 | return mData.get(position).getLayoutId();
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/source_code/simplerecyclerviewadapter/src/main/res/drawable-v24/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
12 |
13 |
19 |
22 |
25 |
26 |
27 |
28 |
34 |
35 |
--------------------------------------------------------------------------------
/source_code/simplerecyclerviewadapter/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/source_code/simplerecyclerviewadapter/src/main/res/layout/item_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
13 |
--------------------------------------------------------------------------------
/source_code/simplerecyclerviewadapter/src/main/res/layout/item_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
13 |
--------------------------------------------------------------------------------
/source_code/simplerecyclerviewadapter/src/main/res/layout/item_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
13 |
--------------------------------------------------------------------------------
/source_code/simplerecyclerviewadapter/src/main/res/layout/item_4.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
--------------------------------------------------------------------------------
/source_code/simplerecyclerviewadapter/src/main/res/layout/item_empty.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
12 |
--------------------------------------------------------------------------------
/source_code/simplerecyclerviewadapter/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/source_code/simplerecyclerviewadapter/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/source_code/simplerecyclerviewadapter/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/simplerecyclerviewadapter/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/source_code/simplerecyclerviewadapter/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/simplerecyclerviewadapter/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/source_code/simplerecyclerviewadapter/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/simplerecyclerviewadapter/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/source_code/simplerecyclerviewadapter/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/simplerecyclerviewadapter/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/source_code/simplerecyclerviewadapter/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/simplerecyclerviewadapter/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/source_code/simplerecyclerviewadapter/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/simplerecyclerviewadapter/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/source_code/simplerecyclerviewadapter/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/simplerecyclerviewadapter/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/source_code/simplerecyclerviewadapter/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/simplerecyclerviewadapter/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/source_code/simplerecyclerviewadapter/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/simplerecyclerviewadapter/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/source_code/simplerecyclerviewadapter/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/source_code/simplerecyclerviewadapter/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/source_code/simplerecyclerviewadapter/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/source_code/simplerecyclerviewadapter/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | SimpleRecyclerViewAdapter
3 |
4 |
--------------------------------------------------------------------------------
/source_code/simplerecyclerviewadapter/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/source_code/simplerecyclerviewadapter/src/test/java/guolei/com/simplerecyclerviewadapter/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package guolei.com.simplerecyclerviewadapter;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() throws Exception {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/xposed_about/Android最强黑科技-Xposed.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/xposed_about/Android最强黑科技-Xposed.pdf
--------------------------------------------------------------------------------
/xposed_about/out-dex2jar.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Guolei1130/blog_resource/7c64c7772555378ed3a621802a82c33529d94051/xposed_about/out-dex2jar.jar
--------------------------------------------------------------------------------