吾爱破解 - 52pojie.cn

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 2963|回复: 3
收起左侧

[会员申请] 申请ID:StarvedFish【申请通过】

[复制链接]
吾爱游客  发表于 2021-4-21 17:57
搜狗截图20210421161652.png 搜狗截图20210421161701.png

之前申请的不知道怎么没看到,重新申请并增加步骤说明。
1、申 请 I D:StarvedFish
2、个人邮箱:j1997321@qq.com
3、原创技术文章:
破解一个电影App去广告,代码地址 DGMovie
在代码提交记录中可以看到我的邮箱j1997321@qq.com,用以证明本人身份

具体步骤如下

已破解包的地址

工具

冬瓜影视去广告步骤记录

使用环境 AndroidKiller 1.3.1.0apktool-2.4.1dex2jar-2.1framework-res-28.apkJD-GUI—-1.6.6

此版本基于1.1.1版进行修改,此版本已知问题:播放时快退偶尔会快进

配置环境

在AK中打开APKTOOL管理器,指定apktool版本为apktool-2.4.1,指定apktool framework为framework-res-28.apk。

使用dex2jar将两个dex都转成jar文件,使用JD-GUI查看源代码,然后在AK中找到对应的代码进行修改

smali语法教程

smali 语法教程1 https://blog.csdn.net/lpohvbe/article/details/7981386

smali 语法教程2 https://www.cnblogs.com/lee0oo0/p/3728271.html

踩坑步骤

使用AK编译,直接报错

解决方法:在AK上面的APKTOOL管理器,指定apktool版本为apktool-2.4.1

回编译报错,提示No resource identifier found for attribute 'compileSdkVersion' in package 'android'

解决方法:提取AVD的28版本的系统镜像system.img/sytem/framework/framework-res.apk
然后在AK上面的APKTOOL管理器, 指定apktool framework为framework-res-28.apk

注意:最好用新版的,DG影视的sdk是28,用26的资源框架反编译会报错

具体步骤
  1. 安装后打开,提示“您的安装包异常”

    此问题是由于代码中验证了签名

    解决方法:全局搜索"您的安装包异常";或者使用AK搜索unicode转义字符。定位到判断逻辑,位于com.waxgourd.wg.WaxgourdApp里,通过KS()方法判断,如果这个方法返回true,则会退出应用。

    java代码如下:

     public boolean KS()
     {
       String str1 = EncryptUtils.getSHA1FromJNI();
       String str2 = com.waxgourd.wg.utils.b.r(this, getPackageName(), "SHA1");
       StringBuilder localStringBuilder = new StringBuilder();
       localStringBuilder.append("sha1Now = ");
       localStringBuilder.append(str2);
       Log.d("WaxgourdApp", localStringBuilder.toString());
       return TextUtils.equals(str1, str2) ^ true;
     }

    因此,修改smali文件817行的xor-int/lit8 v0, v0, 0x1xor-int/lit8 v0, v0, 0x0

  2. 去除升级提醒

    修改AndroidManifest.xml中的platformBuildVersionCode,改高点,改为119,打包发现还是提醒,然后修改apktool.yml文件里的VersionCode为100,解决。

  3. 设置为debug模式,用于AS中查看布局

    首先在AndroidManifest.xmlapplication标签里增加android:debuggable="true"

  4. 去除首页列表中的广告列表里的一个广告

    通过AS的布局查看器,定位到广告的控件是ImageView,id为iv_cover,全局检索此id,定位到布局文件为bean_recycle_item_video_ad,修改bean_recycle_item_video_ad中的ImageView的高度为0dp

    <ImageView android:id="@id/iv_cover" android:background="#fff2f2f2" android:paddingTop="6.0dip" android:layout_width="fill_parent" android:layout_height="0dip"
  5. 为了防止广告还是被点击到,在全局检索布局文件bean_recycle_item_video_ad的id0x7f0c0073,定位到代码类com/waxgourd/wg/ui/viewbinder/b.smalib.smali中发现,广告信息都存放在AdInfoBean这个实体类中,进入com/waxgourd/wg/javabean/AdInfoBean,把getAdUrl返回值改为null,把getAdPic返回值改为""

    .method public getAdUrl()Ljava/lang/String;
       .locals 1
    
       .line 50
       const/4 v0, 0x0
    
       return-object v0
    .end method
    .method public getAdPic()Ljava/lang/String;
       .locals 1
    
       .line 42
       const-string v0, ""
    
       return-object v0
    .end method

    此时已经成功的去除了列表下部分中的一个广告。

    看日志提示图片加载失败,所以把getAdPic改回了
    >
    > > iget-object v0, p0, Lcom/waxgourd/wg/javabean/AdInfoBean;->adPic:Ljava/lang/String; > > return-object v0 >

  6. 修改启动页的等待时间为0s

    计时代码在com.waxgourd.wg.module.splash.SplashPresentercountDownSplash()

    .line 67
       sget-object v0, Ljava/util/concurrent/TimeUnit;->SECONDS:Ljava/util/concurrent/TimeUnit;
    
       const-wide/16 v1, 0x2
    
    invoke-static {v1, v2, v0}, La/a/m;->b(JLjava/util/concurrent/TimeUnit;)La/a/m;
    

    中的0x2修改为0x0

  7. 去除启动页广告

    查看com.waxgourd.wg.module.ad.AdActivity里代码,发现有个关闭界面的方法

    .line 65
          iget-object p1, p0, Lcom/waxgourd/wg/module/ad/AdActivity$b;->bMY:Lcom/waxgourd/wg/module/ad/AdActivity;
    
          invoke-virtual {p1}, Lcom/waxgourd/wg/module/ad/AdActivity;->finish()V

    查看AdActivtiy,发现它的父类BaseActivityonCreate()最先执行的方法是Lv(),于是在AdActivity中的Lv()添加finish方法

    .line 56
    
          iget-object v0, p0, Lcom/waxgourd/wg/module/ad/AdActivity;->bWX:Lcom/waxgourd/wg/framework/BasePresenter;
    .line 56
    
    iget-object p1, p0, Lcom/waxgourd/wg/module/ad/AdActivity$b;->bMY:Lcom/waxgourd/wg/module/ad/AdActivity;
    
    invoke-virtual {p1}, Lcom/waxgourd/wg/module/ad/AdActivity;->finish()V
    
     iget-object v0, p0, Lcom/waxgourd/wg/module/ad/AdActivity;->bWX:Lcom/waxgourd/wg/framework/BasePresenter;

    发现这样会崩溃。

    然后准备修改倒计时的时间,com.waxgourd.wg.module.ad.AdPresentercountDownSplash方法为倒计时方法,修改时间由5为0,运行后发现只是把计时器关了,还是需要手动在广告界面点击关闭按钮。

    发现com.waxgourd.wg.module.ad.AdActivity界面有个mLayoutSkip,定位到.line63v0mLayoutSkip的寄存器。模拟点击即可跳过广告界面

          invoke-virtual {v0, v1}, Landroid/widget/FrameLayout;->setOnClickListener(Landroid/view/View$OnClickListener;)V
    
           .line 67

    改为

    invoke-virtual {v0, v1}, Landroid/widget/FrameLayout;->setOnClickListener(Landroid/view/View$OnClickListener;)V
    
       invoke-virtual {v0}, Landroid/view/View;->performClick()Z
    
       .line 67

    广告启动页成功去除

  8. 去除顶部轮播图的广告

    发现顶部轮播图的广告是可以点击跳转的,普通视频则不会,所以想通过数据判断是否为正常视频,否则就从适配器的数据源中剔除。通过布局查看器,发现轮播图的控件是Banner,id为banner_recommend_fragment,全局检索,使用该控件的布局是bean_fragment_recommend.xml,id为0x7f0c0046,检索发现对应的类为com.waxgourd.wg.module.videorecommend.VideoRecommendFragment,发现里面往Banner塞数据的是VideoRecommendFragmenta(List<String> paramList1, List<String> paramList2, List<BannerBean> paramList)方法,发现里面有调用k.i()进行输出,所以定位到com.waxgourd.wg.utils.k,发现这应该是一个日志输出类,但是作者把Log日志去掉了。

  9. 把Log日志加到com.waxgourd.wg.utils.k中的e(),d(),i()方法

    .method public static i(Ljava/lang/String;Ljava/lang/String;)V
       .locals 0
    
       return-void
    .end method

    改为

    .method public static i(Ljava/lang/String;Ljava/lang/String;)V
       .locals 0
    
       .param p0, "paramString1"    # Ljava/lang/String;
       .param p1, "paramString2"    # Ljava/lang/String;
    
       .prologue
       invoke-static {p0, p1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
    
       return-void
    .end method

    e()d()类似,这样就把作者去除的日志都打印出来了

  10. 通过查看数据,打印了解密后的网络请求数据

    {"bannerData":[{"id":"76","phone_type":"3","slide_pic":"https:\/\/storage.taifutj.com\/admin\/202002151315902new.jpg","target_name":"\u8425\u6551","type":"1","zt_id":null,"vod_id":"143606","web_url":"","android_router":"","ios_router":{},"banner_content":"\u6700\u65b0\u7535\u5f71\u2014\u89e3\u653e\u00b7\u7ec8\u5c40\u8425\u6551","pid_banner":"1","zt_router":{"zt_tag":"","zt_type":"","zt_pid":2}},{"id":"75","phone_type":"3","slide_pic":"https:\/\/storage.taifutj.com\/admin\/202002151313311new.jpg","target_name":"tibfd","type":"1","zt_id":null,"vod_id":"140522","web_url":"","android_router":"","ios_router":{},"banner_content":"\u52c7\u6562\u8005\u6e38\u620f2\u2014\u6700\u65b0\u9ad8\u6e05\u7248","pid_banner":"1","zt_router":{"zt_tag":"","zt_type":"","zt_pid":2}},{"id":"74","phone_type":"3","slide_pic":"https:\/\/storage.taifutj.com\/admin\/202002100945223new.jpg","target_name":"\u4e0a\u53e4\u6c90\u6708","type":"1","zt_id":null,"vod_id":"143539","web_url":"","android_router":"","ios_router":{},"banner_content":"\u5434\u78ca\u738b\u4fca\u51ef\u70ed\u8840\u96c6\u7ed3\uff01\u4e0a\u53e4\u5bc6\u7ea6\uff01","pid_banner":"1","zt_router":{"zt_tag":"","zt_type":"","zt_pid":2}},{"id":"73","phone_type":"3","slide_pic":"https:\/\/storage.taifutj.com\/admin\/202002100944487new.jpg","target_name":"xiayizhan","type":"1","zt_id":null,"vod_id":"143145","web_url":"","android_router":"","ios_router":{},"banner_content":"\u4e0b\u4e00\u7ad9\u662f\u5e78\u798f\u2014\u706b\u70ed\u8fde\u66f4\u4e2d\uff01","pid_banner":"1","zt_router":{"zt_tag":"","zt_type":"","zt_pid":2}},{"id":"70","phone_type":"3","slide_pic":"https:\/\/storage.taifutj.com\/admin\/20200204194039new.jpg","target_name":"\u5927\u4e3b\u5bb0","type":"1","zt_id":null,"vod_id":"143255","web_url":"","android_router":"","ios_router":{},"banner_content":"\u738b\u6e90\u6b27\u9633\u5a1c\u5a1c\u5c11\u5e74\u5f81\u9014","pid_banner":"1","zt_router":{"zt_tag":"","zt_type":"","zt_pid":2}},{"id":"37","phone_type":"3","slide_pic":"https:\/\/storage.taifutj.com\/admin\/20200129181220new.jpg","target_name":"679\u68cb\u724c","type":"13","zt_id":null,"vod_id":"","web_url":"http:\/\/679966.cn:679\/679.html?shareName=xg123119xg.com","android_router":"","ios_router":{},"banner_content":"679\u68cb\u724c\uff1a\u73b0\u5728\u4e0b\u8f7d\u6ce8\u518c\uff0c\u7acb\u9001679\u5143\u5927\u793c\uff01","pid_banner":"1","zt_router":{"zt_tag":"","zt_type":"","zt_pid":2}},{"id":"62","phone_type":"3","slide_pic":"https:\/\/storage.taifutj.com\/admin\/202001251850446new.jpg","target_name":"\u4e09\u751f\u4e09\u4e16","type":"1","zt_id":null,"vod_id":"140864","web_url":"","android_router":"","ios_router":{},"banner_content":"\u4e09\u751f\u4e09\u4e16\u518d\u7eed\u524d\u7f18","pid_banner":"1","zt_router":{"zt_tag":"","zt_type":"","zt_pid":2}},{"id":"46","phone_type":"3","slide_pic":"https:\/\/storage.taifutj.com\/admin\/202001311825415new.jpg","target_name":"one","type":"13","zt_id":null,"vod_id":"","web_url":"https:\/\/one6.app\/","android_router":"","ios_router":{},"banner_content":"ONE\uff1a\u6210\u4eba\u7684\u4e16\u754c\uff0c\u4e00\u4e2a\u5c31\u591f\u4e86\u3002","pid_banner":"1","zt_router":{"zt_tag":"","zt_type":"","zt_pid":2}}],"noticeData":{"id":0,"notice_name":"","notice_pic":"","notice_cont":"","type":"","vod_id":"","web_url":"","zt_id":"","android_router":"","ios_router":[],"zt_router":{"zt_tag":"","zt_type":"","zt_pid":2},"end_time":""},"noticeNewData":[]}
    2020-02-20 23:57:24.999 16641-16933/com.waxgourd.wg I/JsonConvertFactory: jsonResult : {"code":200,"msg":"succ","data":{"bannerData":[{"id":"76","phone_type":"3","slide_pic":"https://storage.taifutj.com/admin/202002151315902new.jpg","target_name":"营救","type":"1","vod_id":"143606","web_url":"","android_router":"","ios_router":{},"banner_content":"最新电影—解放·终局营救","pid_banner":"1","zt_router":{"zt_tag":"","zt_type":"","zt_pid":2}},{"id":"75","phone_type":"3","slide_pic":"https://storage.taifutj.com/admin/202002151313311new.jpg","target_name":"tibfd","type":"1","vod_id":"140522","web_url":"","android_router":"","ios_router":{},"banner_content":"勇敢者游戏2—最新高清版","pid_banner":"1","zt_router":{"zt_tag":"","zt_type":"","zt_pid":2}},{"id":"74","phone_type":"3","slide_pic":"https://storage.taifutj.com/admin/202002100945223new.jpg","target_name":"上古沐月","type":"1","vod_id":"143539","web_url":"","android_router":"","ios_router":{},"banner_content":"吴磊王俊凯热血集结!上古密约!","pid_banner":"1","zt_router":{"zt_tag":"","zt_type":"","zt_pid":2}},{"id":"73","phone_type":"3","slide_pic":"https://storage.taifutj.com/admin/202002100944487new.jpg","target_name":"xiayizhan","type":"1","vod_id":"143145","web_url":"","android_router":"","ios_router":{},"banner_content":"下一站是幸福—火热连更中!","pid_banner":"1","zt_router":{"zt_tag":"","zt_type":"","zt_pid":2}},{"id":"70","phone_type":"3","slide_pic":"https://storage.taifutj.com/admin/20200204194039new.jpg","target_name":"大主宰","type":"1","vod_id":"143255","web_url":"","android_router":"","ios_router":{},"banner_content":"王源欧阳娜娜少年征途","pid_banner":"1","zt_router":{"zt_tag":"","zt_type":"","zt_pid":2}},{"id":"37","phone_type":"3","slide_pic":"https://storage.taifutj.com/admin/20200129181220new.jpg","target_name":"679棋牌","type":"13","vod_id":"","web_url":"http://679966.cn:679/679.html?shareName\u003dxg123119xg.com","android_router":"","ios_router":{},"banner_content":"679棋牌:现在下载注册,立送679元大礼!","pid_banner":"1","zt_router":{"zt_tag":"","zt_type":"","zt_pid":2}},{"id":"62","phone_type":"3","slide_pic":"https://storage.taifutj.com/admin/202001251850446new.jpg","target_name":"三生三世","type":"1","vod_id":"140864","web_url":"","android_router":"","ios_router":{},"banner_content":"三生三世再续前缘","pid_banner":"1","zt_router":{"zt_tag":"","zt_type":"","zt_pid":2}},{"id":"46","phone_type":"3","slide_pic":"https://storage.taifutj.com/admin/202001311825415new.jpg","target_name":"one","type":"13","vod_id":"","web_url":"https://one6.app/","android_router":"","ios_router":{},"banner_content":"ONE:成人的世界,一个就够了。","pid_banner":"1","zt_router":{"zt_tag":"","zt_type":"","zt_pid":2}}],"noticeData":{"id":0,"notice_name":"","notice_pic":"","notice_cont":"","type":"","vod_id":"","web_url":"","zt_id":"","android_router":"","ios_router":[],"zt_router":{"zt_tag":"","zt_type":"","zt_pid":2},"end_time":""},"noticeNewData":[]}}

    格式化后发现,如果web_url参数不为空则是广告,调用com.waxgourd.wg.module.videorecommend.VideoRecommendFragmenta(List<String> paramList1, List<String> paramList2, List<BannerBean> paramList)方法的是com.waxgourd.wg.module.videorecommend.VideoRecommendPresenter的一个方法

      private void setBannerAndNotice(BannerAndNoticeListBean paramBannerAndNoticeListBean) {
        List list1 = paramBannerAndNoticeListBean.getBannerList();
        if (list1 != null) {
          int i = list1.size();
          ArrayList<String> arrayList1 = new ArrayList(i);
          ArrayList<String> arrayList2 = new ArrayList(i);
          for (BannerBean bannerBean : list1) {
            arrayList1.add(bannerBean.getSlidePic());
            arrayList2.add(bannerBean.getBanner_content());
            StringBuilder stringBuilder = new StringBuilder();
            stringBuilder.append("picUrls == ");
            stringBuilder.append(bannerBean.getSlidePic());
            stringBuilder.append(" vodId == ");
            stringBuilder.append(bannerBean.getVodId());
            stringBuilder.append(" bannerContent : ");
            stringBuilder.append(bannerBean.getBanner_content());
            k.i("VideoRecommendPresenter", stringBuilder.toString());
          } 
          ((VideoRecommendContract.b)this.mView).a(arrayList1, arrayList2, list1);
        } 
        List list2 = paramBannerAndNoticeListBean.getNoticeList();
        ((VideoRecommendContract.b)this.mView).ah(list2);
      }

    所以在for循环里做判断,如果!TextUtil.isEmpty(bnnerBean.getWebUrl())就continue;

    通过AndroidStudio运行java2smali插件,参考出!TextUtil.isEmpty(bnnerBean.getWebUrl())对应的代码。

    原smali

             .line 53
        invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;
    
        move-result-object v1
    
        :goto_0
        invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
    
        move-result v4
    
        if-eqz v4, :cond_0
    
        invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
    
        move-result-object v4
    
        check-cast v4, Lcom/waxgourd/wg/javabean/BannerBean;
    

    修改为(#中为新加的)

     .line 53
        invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;
    
        move-result-object v1
    
        #1
        :cond_1a
        #1
        :goto_0
        invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
    
        move-result v4
    
        if-eqz v4, :cond_0
    
        invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
    
        move-result-object v4
    
        check-cast v4, Lcom/waxgourd/wg/javabean/BannerBean;
    
        #2
    
        invoke-virtual {v4}, Lcom/waxgourd/wg/javabean/BannerBean;->getWebUrl()Ljava/lang/String;
    
        move-result-object v5
    
        invoke-static {v5}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
    
        move-result v5
    
        if-eqz v5, :cond_1a
    
        #2
    

    :cond_1a 指定一个跳转,用于实现continue跳转

    v4寄存器中存的是for循环里的BannerBean实例

    #2

    调用bannerBean.getWebUrl()

    字符串结果存到v5寄存器

    调用TextUtils.isEmpty(v5)

    结果存到v5中

    if(v5==0) 跳转到cond_1a

    #2

    这样就实现了在for循环里做判断,如果!TextUtil.isEmpty(bnnerBean.getWebUrl())就continue;

    这样就成功的去除了顶部轮播图的广告

  11. 去除播放界面位于播放器下面的广告

    通过布局查看,定位到广告是一个id为iv_ad的ImageView,在bean_activity_player.xml中,修改它的高度为0dip

    <ImageView android:id="@id/iv_ad" android:background="@color/colorDivider" android:paddingTop="3.0dip" android:paddingBottom="1.0dip" android:layout_width="fill_parent" android:layout_height="65.0dip" app:layout_constraintTop_toTopOf="parent" />
  12. 去除暂停和播放前的广告

    暂停时的广告控件是一个id为layout_pause_ad的FrameLayout,使用该控件的布局id为bean_video_player_landbean_video_player_normal,分别把这两个布局里id为layout_pause_adFrameLayout高度改为0dip。修改后发现暂停时虽然不显示广告,但是也没有显示暂停按钮,所以还原此改动。搜索发现layout_pause_ad的id为0x7f09015f,对应的十进制为2131296607,在com.waxgourd.wg.ui.widget.LandLayoutVideo中调用,成员变量名为bZs

    发现onVideoPause()中间有个判断

    if (this.bZw.OO()) {
            this.bZr = true;
            changeAdUIState();
      } 

    startPlayLogic()中有个判断

    if (this.bZw != null && this.bZw.OR()) {
          this.bZn = true;
          changeAdUIState();
          return;
    } 

    所以应该把bZwOO()OR()都返回flase

      public final boolean OO() {
        if (this.bWw != null) {
          CharSequence charSequence;
          VideoAdBean videoAdBean = this.bWw;
          if (videoAdBean != null) {
            charSequence = videoAdBean.getAdType();
          } else {
            charSequence = null;
          } 
          if (!TextUtils.isEmpty(charSequence)) {
            a a1 = this.bWr;
            if (a1 != null) {
              VideoAdBean videoAdBean1 = this.bWw;
              if (videoAdBean1 == null)
                j.SU(); 
              a1.fo(videoAdBean1.getAdUrl());
            } 
            if (!this.bWq)
              OP(); 
            return true;
          } 
        } 
        return false;
      }

    所以可以直接把com.waxgourd.wg.javabean.VideoAdBeangetAdType()返回"",修改如下

    .method public final getAdType()Ljava/lang/String;
        .locals 1
    
        .line 8
         # iget-object v0, p0, Lcom/waxgourd/wg/javabean/VideoAdBean;->adType:Ljava/lang/String;
         const/4 v0, 0x0
    
        return-object v0
    .end method

    编译运行,发现播放界面的广告,包括启动播放和暂停播放的广告都已经成功隐藏

    至此,1.1.1_c1版本已经完成

  13. 去除顶部轮播图

    发现顶部轮播图虽然不显示广告和文字,但是点击跳转的界面是不正确的,而且有可能跳转到广告,因此直接在布局中banner_recommend_fragment隐藏Banner,将Banner高度设置为0dip

    <com.waxgourd.wg.ui.widget.Banner android:id="@id/banner_recommend_fragment" android:layout_width="fill_parent" android:layout_height="0.0dip" app:indicator_drawable_selected="@drawable/shape_indicator_banner" app:layout_scrollFlags="scroll" app:title_height="40.0dip" app:title_textcolor="@color/colorWhite" app:title_textsize="@dimen/text_size_16sp" />
    

    打包为1.1.1_c2版本

2020-03-26

  1. 发现APP无法加载数据,抓包发现接口地址由http://api.juoejpp.com/App/Index/getSearchInfo改为了http://dg.6172c.com/App/Index/getSearchInfo。全局搜索,发现定义全局url的位置在com.waxgourd.wg.a.smail,修改域名。

     const-string v4, "api.juoejpp.com"

    修改为

     const-string v4, "dg.6172c.com"

    测试已经可以正常观看

    打包为1.1.1_c3版本

2020-03-28

  1. 去除顶部公告栏

    在布局中bean_fragment_recommend.xml隐藏id为text_switcher_notice的控件,将高度设置为0dip

    <com.waxgourd.wg.ui.widget.TextSwitcher android:id="@id/text_switcher_notice" android:layout_width="fill_parent" android:layout_height="0dip" android:inAnimation="@anim/notice_text_in" android:outAnimation="@anim/notice_text_out" android:paddingStart="12.0dip" android:paddingEnd="12.0dip" app:layout_scrollFlags="scroll" />     
  2. 修复快退有问题,经常跳转错误

    原因是ijkplayer在跳转进度的时候,只跳转了关键帧。

    全局检索setOption,定位到com.shuyu.gsyvideoplayer.e.b.smali文件中对ijk做了参数设置,添加ijkMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_PLAYER, "enable-accurate-seek", 1);即可

    原java代码为

    if (GSYVideoType.isMediaCodec()) {
            Debuger.printfLog("enable mediaCodec");
            this.bHL.setOption(4, "mediacodec", 1L);
            this.bHL.setOption(4, "mediacodec-auto-rotate", 1L);
            this.bHL.setOption(4, "mediacodec-handle-resolution-change", 1L);
    }

    所以应该在if判断前加上this.bHL.setOption(4, "enable-accurate-seek", 1L);//添加这行

    对应的smali为

            iget-object v0, p0, Lcom/shuyu/gsyvideoplayer/e/b;->bHL:Ltv/danmaku/ijk/media/player/IjkMediaPlayer;
    
        const-string v1, "enable-accurate-seek"
    
        const-wide/16 v4, 0x1
    
        const/4 v2, 0x4
    
        invoke-virtual {v0, v2, v1, v4, v5}, Ltv/danmaku/ijk/media/player/IjkMediaPlayer;->setOption(ILjava/lang/String;J)V
    

    修改后为

    .line 70
        :try_start_0
    
       ###start add
    
       iget-object v0, p0, Lcom/shuyu/gsyvideoplayer/e/b;->bHL:Ltv/danmaku/ijk/media/player/IjkMediaPlayer;
    
        const-string v1, "enable-accurate-seek"
    
        const-wide/16 v4, 0x1
    
        const/4 v2, 0x4
    
        invoke-virtual {v0, v2, v1, v4, v5}, Ltv/danmaku/ijk/media/player/IjkMediaPlayer;->setOption(ILjava/lang/String;J)V
    
            ###end add
    
        invoke-static {}, Lcom/shuyu/gsyvideoplayer/utils/GSYVideoType;->isMediaCodec()Z
    
        move-result v0

    增加了此设置后,仍然出现跳帧。并且新版本的app也有此问题。原因可能是视频源关键帧过少,无法解决。

    回退相应代码

  3. 去除启动时首页的活动弹窗

    定位到HomepageActivity中

      public void V(List<HomeDialogBean> paramList) {
        if (paramList == null || paramList.isEmpty())
          return; 
        ArrayList<HomeNoticeDialogFragment> arrayList = new ArrayList();
        for (HomeDialogBean homeDialogBean : paramList) {
          HomeNoticeDialogFragment homeNoticeDialogFragment;
          paramList = null;
          if (homeDialogBean.getActivityType() == 1) {
            HomeDialogFragment homeDialogFragment = HomeDialogFragment.a(homeDialogBean);
          } else if (homeDialogBean.getActivityType() == 2) {
            homeNoticeDialogFragment = HomeNoticeDialogFragment.bYe.b(homeDialogBean);
          } 
          if (homeNoticeDialogFragment == null)
            continue; 
          arrayList.add(homeNoticeDialogFragment);
          homeNoticeDialogFragment.a((BaseHomeDialogFragment.b)new Object(this, arrayList));
          homeNoticeDialogFragment.a(new _$$Lambda$HomepageActivity$I_fsC5GNds76wunFi2EqWGEcj0A(this, arrayList));
        } 
        if (!arrayList.isEmpty())
          ((BaseHomeDialogFragment)arrayList.get(0)).a(gL(), "dialog0"); 
      }

    可以看到,把最外层的if中,paramList.isEmpty()改为!paramList.isEmpty()即可。

    .line 300
        invoke-interface {p1}, Ljava/util/List;->isEmpty()Z
    
        move-result v0
    
        if-eqz v0, :cond_0
    
        goto :goto_2

    修改为

    .line 300
        invoke-interface {p1}, Ljava/util/List;->isEmpty()Z
    
        move-result v0
    
        if-neq v0, :cond_0
    
        goto :goto_2

发帖前要善用论坛搜索功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。

Hmily 发表于 2021-4-22 11:16
I D:StarvedFish
邮箱:j1997321@qq.com

申请通过,欢迎光临吾爱破解论坛,期待吾爱破解有你更加精彩,ID和密码自己通过邮件密码找回功能修改,请即时登陆并修改密码!
登陆后请在一周内在此帖报道,否则将删除ID信息。
StarvedFish 发表于 2021-4-22 14:54
StarvedFish 发表于 2021-4-23 16:08
您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则

返回列表

RSS订阅|小黑屋|处罚记录|联系我们|吾爱破解 - LCG - LSG ( 京ICP备16042023号 | 京公网安备 11010502030087号 )

GMT+8, 2024-11-24 12:02

Powered by Discuz!

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表