V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
lightningr
V2EX  ›  分享发现

半成品的支付宝付款码 UWP

  •  
  •   lightningr · 2016-03-08 00:35:48 +08:00 · 2720 次点击
    这是一个创建于 3033 天前的主题,其中的信息可能已经有所发展或是发生改变。

    用 apktool 对手机支付宝做了几天逆向工程,勉强做出一个可以用的付款码

    UWP 项目地址: https://github.com/lightingr/alipay_barcode_uwp
    AS 项目地址: https://github.com/lightingr/alipay_barcode_smali

    所需工具:
    Android Studio
    Smalidea 插件,下载地址: https://bitbucket.org/JesusFreke/smali/downloads/smalidea-0.03.zip
    Visual Studio ( Community 就够了,要带 Win10 开发)

    支付宝 9.5.1.011302 (官方现在已经到 9.5.3 ,酷安还有旧的 http://www.coolapk.com/apk/com.eg.android.AlipayGphone
    装了上述版本支付宝的安卓设备(没有试过 Genymotion ,不知道行不行)

    具体步骤

    1. 使用 android studio 打开 AS 项目
    2. 安装 smalidea 插件: File->Settings->Plugigs->Install plugin from disk
    3. Run->Edit Configurations
    4. 打开支付宝,然后登陆
    5. 打开 Tools > Android Device Monitor (或者在 SDK 的 tool 文件夹下,打开 monitor 文件),选中 com.eg.android.AlipayGphone 进程
    6. 在 Android Studio 里面, Run->Debug
    7. 到安卓设备里面打开支付宝里面登陆,然后点付款码
    8. 看 Debug 的 Console 视图,就会打印 tid , encryptedSeed,userID,index 几个值了
    9. 用 VS 开启 UWP 项目,把 tid , encryptedSeed,userID,index,填到 Configurations.cs 里面
    10. VS 里面,直接 Build->Deploy 就可以用了
    

    PS :
    encryptedSeed 和 index 好像每天都会更新,目前还不清楚 android 更新这两个值之后,原来的还能不能用。(不过官方 FAQ 里面有说,付款码只要第一次用的时候联网,后面都不需要)

    第 1 条附言  ·  2016-03-08 11:55:02 +08:00
    android 设备可以用装了 ARM-translation 的 Genymotion
    第 2 条附言  ·  2016-03-10 20:41:52 +08:00
    更新了一下,之前写错了一个配置。
    BTW ,这几天我已经测试过,只要不再其他设备登陆支付宝,那几个参数一直有效
    Bairrfhoinn
        1
    Bairrfhoinn  
       2016-03-08 11:22:24 +08:00
    这個干什么用的?为了删除手机里的支付宝客户端?
    lightningr
        2
    lightningr  
    OP
       2016-03-08 11:52:36 +08:00
    @Bairrfhoinn WP 的支付宝客户端功能残缺...我这个就是做了个付款码
    jsq2627
        3
    jsq2627  
       2016-03-08 15:54:31 +08:00
    太赞了!
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1103 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 22:58 · PVG 06:58 · LAX 15:58 · JFK 18:58
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.