电视端常用视频app包名和MainActivity名整理

视频app包名和MainActivity名整理

有些酒店的电视做了限制,无法随意打开视频应用。所以在拿到电视shell后,安装任意视频app,然后通过如下命令启动任意视频app:

1
am start -n 包名/MainActivity名

常见的电视TV客户端的包名和MainActivity名总结如下:

  • 爱奇艺的奇异果TV

    1
    com.gitvdemo.video/com.gala.video.app.epg.HomeActivity
  • 腾讯的极光TV

    1
    com.ktcp.video/com.ktcp.video.activity.MainActivity
  • 优酷的酷喵TV

    1
    com.cibn.tv/com.youku.tv.home.activity.HomeActivity
  • bilibili的iBiliTV

    1
    com.xiaodianshi.tv.yst/com.xiaodianshi.tv.yst.ui.main.MainActivity
  • 芒果的芒果TV

    1
    com.starcor.mango/com.mgtv.tv.launcher.ChannelHomeActivity

获取app包名和activity名的脚本

如下python脚本可以提取任意app的包名和MainActivity名,本质是解析AndroidManifest.xml中的字段。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# python ./search_app.py appname.apk
import os
import sys
import shutil
from xml.dom.minidom import parse
import xml.dom.minidom

def main(argv):
out_dir = "./apktool_result"
manifest_path = out_dir + "/AndroidManifest.xml"

# apktool unpack
get_manifest = "apktool.bat d " + argv[1] + " -o " + out_dir
os.system(get_manifest)

# xml parse
DOMTree = xml.dom.minidom.parse(manifest_path)
collection = DOMTree.documentElement

str1 = collection.getAttribute("package")

activity = collection.getElementsByTagName("activity")
for a in activity:
intent_filter = a.getElementsByTagName("intent-filter")
for i in intent_filter:
action = i.getElementsByTagName("action")
for ac in action:
ac_name = ac.getAttribute("android:name")
if ac_name == "android.intent.action.MAIN":
str2 = a.getAttribute("android:name")
print("****************************************************")
print("%s/%s" % (str1,str2))
print("****************************************************")
print("deleting files,please wait...")
shutil.rmtree(out_dir)
exit(0)

if __name__ == '__main__':
main(sys.argv)