Open vieyahn2017 opened 7 months ago
https://blog.51cto.com/u_16175430/6863495 android启动其他app https://www.cnblogs.com/defineconst/p/7026335.html Android 中如何从一个App启动另外一个App(如启动支付界面、启动地图界面、应用商场下载App等场景)
xposed https://www.cnblogs.com/chenxd/p/7820186.html android黑科技系列——Xposed框架实现拦截系统方法详解 https://blog.csdn.net/qq_34149335/article/details/81129139 解决Xposed拦截并修改:获取手机已安装应用的App包名和App标签问题
安卓四大组件包括:
一、android四大组件详解
1、Activity (1)一个Activity通常就是一个单独的屏幕(窗口),它上面可以显示一些控件也可以监听并处理用户的事件做出响应。 (2)Activity之间通过Intent进行通信。 (3)android应用中每一个Activity都必须要在AndroidManifest.xml配置文件中声明,否则系统将不识别也不执行该Activity。
2、Service (1)service用于在后台完成用户指定的操作。service分为两种: (a)started(启动):当应用程序组件(如activity)调用startService()方法启动服务时,服务处于started状态。 (b)bound(绑定):当应用程序组件调用bindService()方法绑定到服务时,服务处于bound状态。 (2)startService()与bindService()区别: (a)started service(启动服务)是由其他组件调用startService()方法启动的, 这导致服务的onStartCommand()方法被调用。当服务是started状态时, 其生命周期与启动它的组件无关,并且可以在后台无限期运行,即使启动服务的组件已经被销毁。 因此,服务需要在完成任务后调用stopSelf()方法停止,或者由其他组件调用stopService()方法停止。 (b)使用bindService()方法启用服务,调用者与服务绑定在了一起, 调用者一旦退出,服务也就终止,大有“不求同时生,必须同时死”的特点。 (3)开发人员需要在应用程序配置文件中声明全部的service,使用标签。 (4)Service通常位于后台运行,它一般不需要与用户交互,因此Service组件没有图形用户界面。 Service组件需要继承Service基类。Service组件通常用于为其他组件提供后台服务或监控其他组件的运行状态。
3、Content Provider (1)android平台提供了Content Provider使一个应用程序的指定数据集提供给其他应用程序。 其他应用可以通过ContentResolver类从该内容提供者中获取或存入数据。 (2)只有需要在多个应用程序间共享数据是才需要内容提供者。 例如,通讯录数据被多个应用程序使用,且必须存储在一个内容提供者中。它的好处是统一数据访问方式。 (3)ContentProvider实现数据共享。ContentProvider用于保存和获取数据,并使其对所有应用程序可见。 这是不同应用程序间共享数据的唯一方式,因为android没有提供所有应用共同访问的公共存储区。 (4)开发人员不会直接使用ContentProvider类的对象,大多数是通过ContentResolver对象实现对ContentProvider的操作。 (5)ContentProvider使用URI来唯一标识其数据集,这里的URI以content://作为前缀,表示该数据由ContentProvider来管理。
4、Broadcast Receiver (1)你的应用可以使用它对外部事件进行过滤,只对感兴趣的外部事件(如当电话呼入时,或者数据网络可用时) 进行接收并做出响应。广播接收器没有用户界面。 然而,它们可以启动一个activity或serice来响应它们收到的信息,或者用NotificationManager来通知用户。 通知可以用很多种方式来吸引用户的注意力,例如闪动背灯、震动、播放声音等。 一般来说是在状态栏上放一个持久的图标,用户可以打开它并获取消息。 (2)广播接收者的注册有两种方法,分别是程序动态注册和AndroidManifest文件中进行静态注册。 (3)动态注册广播接收器特点是当用来注册的Activity关掉后,广播也就失效了。 静态注册无需担忧广播接收器是否被关闭,只要设备是开启状态,广播接收器也是打开着的。 也就是说哪怕app本身未启动,该app订阅的广播在触发时也会对它起作用。
二、android四大组件总结: (1)4大组件的注册 4大基本组件都需要注册才能使用,每个Activity、service、Content Provider都需要在AndroidManifest文件中进行配置。 AndroidManifest文件中未进行声明的activity、服务以及内容提供者将不为系统所见,从而也就不可用。 而broadcast receiver广播接收者的注册分静态注册(在AndroidManifest文件中进行配置) 和通过代码动态创建并以调用Context.registerReceiver()的方式注册至系统。 需要注意的是在AndroidManifest文件中进行配置的广播接收者会随系统的启动而一直处于活跃状态, 只要接收到感兴趣的广播就会触发(即使程序未运行)。 (2)4大组件的激活 内容提供者的激活:当接收到ContentResolver发出的请求后,内容提供者被激活。 而其它三种组件activity、服务和广播接收器被一种叫做intent的异步消息所激活。 (3)4大组件的关闭 内容提供者仅在响应ContentResolver提出请求的时候激活。而一个广播接收器仅在响应广播信息的时候激活。 所以,没有必要去显式的关闭这些组件。 Activity关闭:可以通过调用它的finish()方法来关闭一个activity。 服务关闭:对于通过startService()方法启动的服务要调用Context.stopService()方法关闭服务, 使用bindService()方法启动的服务要调用Context.unbindService()方法关闭服务。 (4)android中的任务(activity栈) (a)任务其实就是activity的栈,它由一个或多个Activity组成, 共同完成一个完整的用户体验。栈底的是启动整个任务的Activity, 栈顶的是当前运行的用户可以交互的Activity,当一个activity启动另外一个的时候, 新的activity就被压入栈,并成为当前运行的activity。而前一个activity仍保持在栈之中。 当用户按下BACK键的时候,当前activity出栈,而前一个恢复为当前运行的activity。 栈中保存的其实是对象,栈中的Activity永远不会重排,只会压入或弹出。 (b)任务中的所有activity是作为一个整体进行移动的。 整个的任务(即activity栈)可以移到前台,或退至后台。 (c)Android系统是一个多任务(Multi-Task)的操作系统,可以在用手机听音乐的同时, 也执行其他多个程序。每多执行一个应用程序,就会多耗费一些系统内存, 当同时执行的程序过多,或是关闭的程序没有正确释放掉内存,系统就会觉得越来越慢, 甚至不稳定。为了解决这个问题,Android引入了一个新的机制,即生命周期(Life Cycle)。
https://www.jianshu.com/p/727cb0f1dacb [Android] Android Activity详细解析
https://blog.csdn.net/qq_38226902/article/details/124968709 安卓HAL开发指南
HAL(Hardware Abstraction Libraries)
新搜到的 Anki学习卡,记忆神器
https://github.com/ankitects/Anki-Android/blob/master/AnkiDroid/src/main/AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 2009 Andrew <andrewdubya@gmail>
~ Copyright (c) 2009 Nicolas Raoul <nicolas.raoul@gmail.com>
~ Copyright (c) 2009 Edu Zamora <edu.zasu@gmail.com>
~ Copyright (c) 2009 Casey Link <unnamedrambler@gmail.com>
~ Copyright (c) 2011 Norbert Nagold <norbert.nagold@gmail.com>
~
~ This program is free software; you can redistribute it and/or modify it under
~ the terms of the GNU General Public License as published by the Free Software
~ Foundation; either version 3 of the License, or (at your option) any later
~ version.
~
~ This program is distributed in the hope that it will be useful, but WITHOUT ANY
~ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
~ PARTICULAR PURPOSE. See the GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License along with
~ this program. If not, see <http://www.gnu.org/licenses/>.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.ichi2.anki"
android:installLocation="auto"
android:versionCode="21000145"
android:versionName="2.10alpha45">
<!--
The version number is of the form:
<major>.<minor>.<maintenance>[dev|alpha<build>|beta<build>|]
The <build> is only present for alpha and beta releases (e.g., 2.0.4alpha2 or 2.0.4beta4), developer builds do
not have a build number (e.g., 2.0.4dev) and official releases only have three components (e.g., 2.0.4).
The version code is derived from the version name as follows:
AAbbCCtDD
AA: 2-digit decimal number (with leading zeros omitted) representing the major version
bb: 2-digit decimal number representing the minor version
CC: 2-digit decimal number representing the maintenance version
t: 1-digit decimal number representing the type of the build
0: developer build
1: alpha release
2: beta release
3: public release
DD: 2-digit decimal number representing the build
00 for internal builds and public releases
alpha/beta build number for alpha/beta releases
This ensures the correct ordering between the various types of releases (dev < alpha < beta < release) which is
needed for upgrades to be offered correctly.
-->
<uses-feature android:name="android.hardware.camera" android:required="false" />
<uses-feature android:name="android.hardware.camera.any" android:required="false" />
<uses-feature android:name="android.hardware.audio.output" android:required="false" />
<uses-feature android:name="android.software.app_widgets" android:required="false" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.WAKE_LOCK" tools:node="replace"/>
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<permission android:name="com.ichi2.anki.permission.READ_WRITE_DATABASE"
android:label="@string/read_write_permission_label"
android:description="@string/read_write_permission_description"
android:protectionLevel="dangerous" />
<!-- custom tabs library has minimum SDK of 16 -->
<uses-sdk tools:overrideLibrary="android.support.customtabs, com.getbase.floatingactionbutton"/>
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:resizeable="true"
android:smallScreens="true"
android:xlargeScreens="true" />
<application
android:name="com.ichi2.anki.AnkiDroidApp"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:label="@string/app_name"
android:windowSoftInputMode="adjustResize"
android:usesCleartextTraffic="true"
android:largeHeap="true"
android:networkSecurityConfig="@xml/network_security_config">
<activity
android:name="com.ichi2.anki.IntentHandler"
android:configChanges="keyboardHidden|orientation|screenSize|locale"
android:theme="@android:style/Theme.Translucent.NoTitleBar"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.MULTIWINDOW_LAUNCHER" />
</intent-filter>
<!-- *.apkg matcher. NOTE: when pathPattern is used, host and scheme must also be specified -->
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<!-- .apkg files -->
<data
android:host="*"
android:mimeType="*/*"
android:pathPattern=".*\\.apkg"
android:scheme="http" />
<data
android:host="*"
android:mimeType="*/*"
android:pathPattern=".*\\.apkg"
android:scheme="https" />
<data
android:host="*"
android:mimeType="*/*"
android:pathPattern=".*\\.apkg"
android:scheme="content" />
<data
android:host="*"
android:mimeType="*/*"
android:pathPattern=".*\\.apkg"
android:scheme="file" />
<!-- .colpkg files -->
<data
android:host="*"
android:mimeType="*/*"
android:pathPattern=".*\\.colpkg"
android:scheme="http" />
<data
android:host="*"
android:mimeType="*/*"
android:pathPattern=".*\\.colpkg"
android:scheme="https" />
<data
android:host="*"
android:mimeType="*/*"
android:pathPattern=".*\\.colpkg"
android:scheme="content" />
<data
android:host="*"
android:mimeType="*/*"
android:pathPattern=".*\\.colpkg"
android:scheme="file" />
</intent-filter>
<!-- MIME type matcher for .apkg files coming from providers like gmail which hide the file extension -->
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="application/apkg"/>
<data android:mimeType="application/colpkg"/>
<data android:mimeType="application/vnd.anki"/>
<data android:mimeType="application/x-apkg"/>
<data android:mimeType="application/x-colpkg"/>
<data android:mimeType="application/octet-stream" android:scheme="content"/>
<data android:mimeType="application/zip" android:scheme="content"/>
</intent-filter>
<!-- Tasker DO_SYNC intent -->
<intent-filter>
<action android:name="com.ichi2.anki.DO_SYNC" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:theme="@style/Theme_Dark_Compat.Launcher"
android:name="com.ichi2.anki.DeckPicker"
android:exported="false"
android:configChanges="keyboardHidden|orientation|screenSize|locale"
android:label="@string/app_name">
</activity>
<activity
android:name="com.ichi2.anki.StudyOptionsActivity"
android:exported="false"
android:configChanges="keyboardHidden|locale|orientation|screenSize"
android:label="StudyOptions"
android:parentActivityName=".DeckPicker">
<!-- The meta-data element is needed for versions lower than 4.1 -->
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.ichi2.anki.DeckPicker" />
</activity>
<activity
android:name="com.ichi2.anki.CardBrowser"
android:exported="true"
android:configChanges="keyboardHidden|orientation|locale|screenSize"
android:label="Card Browser"
android:parentActivityName=".DeckPicker">
<!-- The meta-data element is needed for versions lower than 4.1 -->
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.ichi2.anki.DeckPicker" />
<intent-filter>
<action android:name="android.intent.action.PROCESS_TEXT" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
</intent-filter>
</activity>
<activity
android:name=".ModelBrowser"
android:exported="false"
android:configChanges="keyboardHidden|orientation|locale|screenSize"
android:label="@string/model_browser_label" />
<activity
android:name=".ModelFieldEditor"
android:configChanges="keyboardHidden|orientation|locale|screenSize"
android:label="@string/model_editor_label" />
<activity
android:name="com.ichi2.anki.Reviewer"
android:exported="true"
android:configChanges="keyboardHidden|orientation|locale|screenSize"
android:windowSoftInputMode="adjustResize"
android:parentActivityName=".DeckPicker">
<!-- The meta-data element is needed for versions lower than 4.1 -->
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.ichi2.anki.DeckPicker" />
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name="com.ichi2.anki.VideoPlayer"
android:exported="false"
android:configChanges="keyboardHidden|orientation|locale|screenSize"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" />
<activity
android:name="com.ichi2.anki.MyAccount"
android:exported="false"
android:configChanges="keyboardHidden|orientation|locale|screenSize"
android:label="@string/menu_my_account" />
<activity
android:name="com.ichi2.anki.Preferences"
android:exported="false"
android:configChanges="keyboardHidden|orientation|locale|screenSize"
android:label="@string/preferences_title"
android:theme="@style/LegacyActionBarLight"/>
<activity
android:name="com.ichi2.anki.DeckOptions"
android:exported="false"
android:configChanges="keyboardHidden|orientation|locale|screenSize"
android:label="@string/deckpreferences_title"
android:theme="@style/LegacyActionBarLight"/>
<activity
android:name=".FilteredDeckOptions"
android:exported="false"
android:configChanges="keyboardHidden|orientation|locale|screenSize"
android:label="@string/deckpreferences_title"
android:theme="@style/LegacyActionBarLight"/>
<activity
android:name="com.ichi2.anki.Info"
android:exported="false"
android:configChanges="locale"
android:label="@string/about_title" />
<activity
android:name="com.ichi2.anki.NoteEditor"
android:exported="true"
android:configChanges="keyboardHidden|orientation|locale|screenSize"
android:label="@string/fact_adder_intent_title" >
<intent-filter>
<action android:name="org.openintents.action.CREATE_FLASHCARD" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
</intent-filter>
</activity>
<activity android:name="com.ichi2.anki.analytics.AnkiDroidCrashReportDialog"
android:theme="@style/Theme.CrashReportDialog"
android:process=":acra"
android:launchMode="singleInstance"
android:excludeFromRecents="true"
android:finishOnTaskLaunch="true" />
<activity
android:name="com.ichi2.anki.Statistics"
android:exported="false"
android:configChanges="keyboardHidden|orientation|locale|screenSize"
android:parentActivityName=".DeckPicker">
<!-- The meta-data element is needed for versions lower than 4.1 -->
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.ichi2.anki.DeckPicker" />
</activity>
<activity
android:exported="false"
android:name="com.ichi2.anki.Previewer"
android:configChanges="locale"
android:label="@string/preview_title" />
<!-- small widget -->
<receiver
android:name="com.ichi2.widget.AnkiDroidWidgetSmall"
android:label="@string/widget_small" >
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="@xml/widget_provider_small" />
</receiver>
<!-- "Add Note" widget -->
<receiver
android:name="com.ichi2.widget.AddNoteWidget"
android:label="@string/widget_add_note">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="@xml/widget_provider_add_note" />
</receiver>
<!-- Service to perform web API queries -->
<service android:name="com.ichi2.widget.AnkiDroidWidgetSmall$UpdateService" />
<receiver
android:name="com.ichi2.anki.receiver.SdCardReceiver"
android:enabled="true"
android:exported="true" >
<intent-filter>
<action android:name="android.intent.action.MEDIA_MOUNTED" />
<data android:scheme="file" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.MEDIA_EJECT" />
<data android:scheme="file" />
</intent-filter>
</receiver>
<receiver android:name=".services.NotificationService"
android:enabled="true"
android:exported="false" />
<receiver
android:name=".services.ReminderService"
android:enabled="true"
android:exported="false" />
<receiver
android:name=".services.BootService"
android:enabled="true"
android:exported="false">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
<activity
android:exported="false"
android:name=".multimediacard.activity.MultimediaEditFieldActivity"
android:configChanges="keyboardHidden|orientation|locale|screenSize"
android:label="@string/title_activity_edit_text" >
</activity>
<activity
android:exported="false"
android:name="com.ichi2.anki.multimediacard.activity.TranslationActivity"
android:configChanges="keyboardHidden|orientation|locale|screenSize"
android:label="@string/title_activity_translation" >
</activity>
<activity
android:exported="false"
android:name="com.ichi2.anki.multimediacard.activity.LoadPronounciationActivity"
android:configChanges="keyboardHidden|orientation|locale|screenSize"
android:label="@string/title_activity_load_pronounciation" >
</activity>
<activity
android:exported="false"
android:name="com.ichi2.anki.CardTemplateEditor"
android:configChanges="keyboardHidden|orientation|locale|screenSize"
android:label="@string/title_activity_template_editor"
android:windowSoftInputMode="stateAlwaysHidden|adjustPan" >
</activity>
<!-- stuff for Samsung Multi-Window -->
<uses-library
android:name="com.sec.android.app.multiwindow"
android:required="false" />
<meta-data
android:name="com.sec.android.support.multiwindow"
android:value="true" />
<meta-data
android:name="com.sec.minimode.icon.portrait.normal"
android:resource="@drawable/anki" />
<meta-data
android:name="com.sec.minimode.icon.landscape.normal"
android:resource="@drawable/anki" />
<provider
android:name=".provider.CardContentProvider"
android:authorities="com.ichi2.anki.flashcards"
android:enabled="true"
android:exported="true" >
<meta-data android:name="com.ichi2.anki.provider.spec" android:value="2" />
</provider>
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="com.ichi2.anki.apkgfileprovider"
android:grantUriPermissions="true"
android:exported="false">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/filepaths" />
</provider>
</application>
</manifest>
https://github.com/r0ysue/FridaAndrioidNativeBeginnersBook 《安卓Frida SO逆向分析实战》随书附件 https://github.com/r0ysue/AndroidFridaBeginnersBook 《安卓Frida逆向与抓包实战》随书附件 https://github.com/r0ysue/AndroidFridaSeniorBook 《安卓Frida逆向与协议分析》随书附件
https://github.com/r0ysue/MobileCTF
安卓 环境
Pixel4/原生安卓13/KernelSU/Lsposed/Frida16/导抓包证书(2023/进阶/安卓13/学习新工具KernelSU) Frida/*posed
简易闯关(2023/入门/安卓13/学习简单算法与Frida调用框架函数) 六层锁机(2023/入门/安卓8/学习frida基本操作/动态加载Dex) FRIDA破解妹子图MZT的防截屏机制(2023/入门/安卓13/Frida hook 安卓系统API) r0capture export p12 cert/Frida hook dlopen/ArtMehod:RegisterNative 抓包
抓到酷安登录包(2023/入门/安卓13/VPN.HTTPS中间人抓包配置) 抓到MZT妹子性感图(2023/入门/安卓13/VPN.HTTPS中间人抓包配置) 抓到BLF登陆包(2023/进阶/安卓13/服务器校验客户端证书、r0capture、frida hook so、SO字符串加密、证书格式) 抓到dida登陆包(2023/进阶/安卓13/r0cap/混淆后的SSL pinning解绑定) 抓到ytx登陆包(2023/进阶/安卓13/flutter写的SSL pinning解绑定) 算法
简易注册机(2023/入门/安卓13/学习算法还原和倒推) 公安比武:天天小额贷(2023/入门/安卓13/学习Frida hook so基操/IDA分析基操) 自研入门算法题(2023/入门/安卓13/学习标准算法的处理流程) easyso(2022/入门/安卓13/简单标准so算法还原) 使用Fart12进行抽取壳的脱壳并修复函数体
简单的仿QQ聊天安卓APP https://github.com/xiuweikang/IM/tree/master
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.sdust.im"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="11"
android:targetSdkVersion="21" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
<uses-permission android:name="android.permission.READ_LOGS" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:resizeable="true"
android:smallScreens="true" />
<application
android:allowBackup="true"
android:icon="@drawable/messageview"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.sdust.im.activity.WelcomeActivity"
android:label="@string/app_name"
android:theme="@android:style/Theme.Light.NoTitleBar" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.sdust.im.activity.register.RegisterActivity"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.Light.NoTitleBar" >
</activity>
<activity
android:name="com.sdust.im.activity.SearchFriendActivity"
android:theme="@android:style/Theme.Light.NoTitleBar" >
</activity>
<activity
android:name="com.sdust.im.activity.LoginActivity"
android:launchMode="singleTask"
android:theme="@android:style/Theme.Light.NoTitleBar" >
</activity>
<activity
android:name="com.sdust.im.activity.FriendSearchResultActivity"
android:launchMode="singleTask" >
</activity>
<activity
android:name="com.sdust.im.activity.ChatActivity"
android:launchMode="singleTask" >
</activity>
<activity
android:name="com.sdust.im.activity.imagefactory.ImageFactoryActivity"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.Light.NoTitleBar" >
</activity>
<activity
android:name="com.sdust.im.activity.MainActivity"
android:theme="@android:style/Theme.Light.NoTitleBar"
android:windowSoftInputMode="adjustPan" >
</activity>
</application>
</manifest>
https://github.com/CarGuo/GSYVideoPlayer
支持 IJKPlayer、 Media3(EXOPlayer2)、MediaPlayer、AliPlayer,实现了多功能的视频播放器。 (请仔细阅读下方各项说明,大多数问题可在下方找到解答)。 鸿蒙版本openharmony-tpc/GSYVideoPlayer 如果克隆太慢或者图片看不到,可尝试从码云地址下载 类型 功能 缓存 边播边缓存,使用了AndroidVideoCache;Media3(ExoPlayer)使用SimpleCache。 协议 h263\4\5、Https、concat、rtsp、hls、rtmp、crypto、mpeg等等。(ijk模式格式支持) 滤镜 简单滤镜(马赛克、黑白、色彩过滤、高斯、模糊、模糊等等20多种)、动画、(水印、画面多重播放等)。 帧图 视频第一帧、视频帧截图功能,视频生成gif功能。 播放 列表播放、列表连续播放、重力旋转与手动旋转、视频本身rotation旋转属性、快播和慢播、网络视频加载速度。 画面 调整显示比例:默认、16:9、4:3、填充;播放时旋转画面角度(0,90,180,270);镜像旋转。 内核 IJKPlayer、Media3(EXOPlayer)、MediaPlayer、AliPlayer切换、自定义内核 布局 全屏与非全屏两套布局切换、没有任何操作控件的纯播放支持、弹幕功能、继承自定义任何布局。 播放 单例播放、多个同时播放、视频列表滑动自动播放、列表切换详情页面无缝播放。 窗口 小窗口、多窗体下(包括桌面)的小窗口播放。 广告 片头广告、跳过广告支持、中间插入广告功能。 字幕 media3(exo2)模式下支持自定增加外挂字幕。 dash media3(exo2) 模式支持dash stream 支持元数据播放 更多 暂停前后台切换不黑屏;调整不同清晰度的支持;无缝切换支持;锁定/解锁全屏点击功能;进度条小窗口预览(测试)。 自定义 可自定义渲染层、自定义管理层、自定义播放层(控制层)、自定义缓存层。
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:ignore="LockedOrientationActivity">
<!-- 请求访问网络状态 -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <!-- 请求访问网络 -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<uses-permission android:name="android.permission.WRITE_SETTINGS"
tools:ignore="ProtectedPermissions" />
<application
android:name=".GSYApplication"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:networkSecurityConfig="@xml/network_security_config"
android:supportsRtl="true"
android:theme="@style/AppTheme"
android:usesCleartextTraffic="true"
tools:ignore="AllowBackup,UnusedAttribute">
<activity android:name=".ViewPager2Activity" />
<activity
android:name=".MainActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize|uiMode"
android:exported="true"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".PlayActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize|uiMode"
android:screenOrientation="portrait"
android:theme="@style/Theme.AppCompat.Translucent" />
<activity
android:name=".PlayTVActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize|uiMode"
android:screenOrientation="landscape"
android:theme="@style/Theme.AppCompat.Translucent" />
<activity
android:name=".ListVideoActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize|uiMode"
android:screenOrientation="portrait"
android:theme="@style/Theme.AppCompat.Translucent" />
<activity
android:name=".ListVideo2Activity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize|uiMode"
android:screenOrientation="portrait"
android:theme="@style/Theme.AppCompat.Translucent" />
<activity
android:name=".DetailPlayer"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize|uiMode"
android:screenOrientation="portrait" />
<activity
android:name=".RecyclerView2Activity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize|uiMode"
android:screenOrientation="portrait" />
<activity
android:name=".DetailListPlayer"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize|uiMode"
android:screenOrientation="portrait" />
<activity
android:name=".WebDetailActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize|uiMode"
android:screenOrientation="portrait" />
<activity
android:name=".RecyclerViewActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize|uiMode"
android:screenOrientation="portrait" />
<activity
android:name=".DanmkuVideoActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize|uiMode"
android:screenOrientation="portrait" />
<activity
android:name=".FragmentVideoActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize|uiMode"
android:screenOrientation="portrait" />
<activity
android:name=".DetailMoreTypeActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize|uiMode"
android:screenOrientation="portrait" />
<activity
android:name=".InputUrlDetailActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize|uiMode"
android:screenOrientation="portrait" />
<activity
android:name=".PlayEmptyControlActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize|uiMode"
android:screenOrientation="portrait" />
<activity
android:name=".DetailControlActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize|uiMode"
android:screenOrientation="portrait" />
<activity
android:name=".DetailFilterActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize|uiMode"
android:screenOrientation="portrait" />
<activity
android:name=".PlayPickActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize|uiMode"
android:screenOrientation="portrait" />
<activity
android:name=".AutoPlayRecyclerViewActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize|uiMode"
android:screenOrientation="portrait" />
<activity
android:name=".ScrollingActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize|uiMode"
android:label="@string/title_activity_scrolling"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name=".WindowActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize|uiMode"
android:screenOrientation="portrait" />
<activity
android:name=".EmptyActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize|uiMode"
android:screenOrientation="portrait" />
<activity
android:name=".utils.floatUtil.FloatActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize|uiMode"
android:screenOrientation="portrait" />
<activity
android:name=".DetailADPlayer"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize|uiMode"
android:screenOrientation="portrait" />
<activity
android:name=".DetailADPlayer2"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize|uiMode"
android:screenOrientation="portrait" />
<activity
android:name=".ListMultiVideoActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize|uiMode"
android:screenOrientation="portrait"
android:theme="@style/Theme.AppCompat.Translucent" />
<activity
android:name=".ListADVideoActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize|uiMode"
android:screenOrientation="portrait"
android:theme="@style/Theme.AppCompat.Translucent" />
<activity
android:name=".ListADVideoActivity2"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize|uiMode"
android:screenOrientation="portrait"
android:theme="@style/Theme.AppCompat.Translucent" />
<activity
android:name=".exo.DetailExoListPlayer"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize|uiMode"
android:screenOrientation="portrait" />
<activity
android:name=".simple.SimplePlayer"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize|uiMode"
android:screenOrientation="landscape"
android:theme="@style/Theme.AppCompat.Full" />
<activity
android:name=".simple.SimpleDetailActivityMode1"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize|uiMode"
android:screenOrientation="portrait" />
<activity
android:name=".simple.SimpleDetailActivityMode2"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize|uiMode"
android:screenOrientation="landscape" />
<activity
android:name=".simple.SimpleListVideoActivityMode1"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize|uiMode"
android:screenOrientation="portrait"
android:theme="@style/Theme.AppCompat.Translucent" />
<activity
android:name=".simple.SimpleListVideoActivityMode2"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize|uiMode"
android:screenOrientation="portrait"
android:theme="@style/Theme.AppCompat.Translucent" />
<activity
android:name=".simple.SimpleActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize|uiMode"
android:screenOrientation="portrait" />
<activity
android:name=".switchplay.SwitchListVideoActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize|uiMode"
android:screenOrientation="portrait"
android:theme="@style/Theme.AppCompat.Transitions" />
<activity
android:name=".switchplay.SwitchDetailActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize|uiMode"
android:screenOrientation="portrait"
android:theme="@style/Theme.AppCompat.Transitions" />
<activity
android:name=".RecyclerView3Activity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize|uiMode"
android:screenOrientation="portrait"
android:theme="@style/Theme.AppCompat.Transitions" />
<activity
android:name=".DetailNormalActivityPlayer"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize|uiMode"
android:screenOrientation="portrait"
android:theme="@style/Theme.AppCompat.Transitions" />
<activity
android:name=".DetailDownloadPlayer"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize|uiMode"
android:screenOrientation="portrait"
android:theme="@style/Theme.AppCompat.Transitions" />
<activity
android:name=".DetailDownloadExoPlayer"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize|uiMode"
android:screenOrientation="portrait"
android:theme="@style/Theme.AppCompat.Transitions" />
<activity
android:name=".AudioDetailPlayer"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize|uiMode"
android:screenOrientation="portrait"
android:theme="@style/Theme.AppCompat.Transitions" />
<activity
android:name=".exosubtitle.GSYExoSubTitleDetailPlayer"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize|uiMode"
android:screenOrientation="portrait"
android:theme="@style/Theme.AppCompat.Transitions" />
<meta-data
android:name="android.max_aspect"
android:value="2.1" />
</application>
</manifest>
https://blog.csdn.net/qq_52380836/article/details/127352191 Android反编译工具的使用(保姆级教程)
https://github.com/GcsSloop/AndroidNote/tree/master 自定义View 基础篇 安卓自定义View基础 - 坐标系 安卓自定义View基础 - 角度弧度 安卓自定义View基础 - 颜色 进阶篇 安卓自定义View进阶 - 分类和流程 安卓自定义View进阶 - 绘制基本图形 安卓自定义View进阶 - 画布操作 安卓自定义View进阶 - 图片文字 安卓自定义View进阶 - Path基本操作 安卓自定义View进阶 - 贝塞尔曲线 安卓自定义View进阶 - Path完结篇(伪) 安卓自定义View进阶 - Path玩出花样(PathMeasure) 安卓自定义View进阶 - Matrix原理 安卓自定义View进阶 - Matrix详解 安卓自定义View进阶 - Matrix Camera 安卓自定义View进阶 - 事件分发机制原理 安卓自定义View进阶 - 事件分发机制详解 安卓自定义View进阶 - MotionEvent详解 安卓自定义View进阶 - 特殊形状控件事件处理方案 安卓自定义View进阶 - 多点触控详解 安卓自定义View进阶 - 手势检测(GestureDetector) 安卓自定义View进阶 - 缩放手势检测(ScaleGestureDetector) 安卓自定义View进阶 - 画笔基础(Paint)
打卡需求,探寻安卓,尝试入门