duankuixi1930 2014-04-01 14:57
浏览 144
已采纳

修改apk而不反编译它

I understand that this is an odd question, but I have this situation:

I serve an apk directly from a site, this apk has a WebView inside of it which will open a "secure" part of a website.

I would like to track down those who download it, and those who then open it, so I have thought of this:

I compile the apk with the URL written in this way (or in a similar one) :

www.myserver.com/secretplace/landing.php?token=##########

then, just before a user downloads it, I change those ########## characters with a token created on the fly and store in the database, when the user opens the apk, I can check the token and recognize that that was the user that downloaded the apk at that specific moment. I want to change it as if I load the apk in notepad and change it manually...

I really understand that this is odd, but...do you think it will work?

Does someone have some other idea on how to track users who download an apk for those who open it?

the question is: it is possible to modify an apk without decompile it? is there a problem? are there some limitations? such as, "yes you can modify it, but you must use the same number of characters" which could be acceptable.

NOTES: tha apk download and the fact the users MUST use APK to access the site is mandatory.

  • 写回答

1条回答 默认 最新

  • doulu6160 2014-04-01 15:36
    关注

    Yeah, your question is very odd. Anyway, you can do that (in parts). The apk is a compressed folder and you can open it. But more part of code are compiled. But your assets are not. So, you can change some asset file and read it from your app. There is no secure here, but you could just use some log in system if you wanted that (Besides, anyway to use hash in apk will fail in secure because you can just copy the apk to another device).

    There is other way. You can compile your apk on the fly. Use your webservice to change the code you want. Read this: http://developer.android.com/tools/building/building-cmdline.html

    Well, I really recomend you to try some login system with tokens like OAuth (but that is with you).

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 求daily translation(DT)偏差订正方法的代码
  • ¥15 js调用html页面需要隐藏某个按钮
  • ¥15 ads仿真结果在圆图上是怎么读数的
  • ¥20 Cotex M3的调试和程序执行方式是什么样的?
  • ¥20 java项目连接sqlserver时报ssl相关错误
  • ¥15 一道python难题3
  • ¥15 牛顿斯科特系数表表示
  • ¥15 arduino 步进电机
  • ¥20 程序进入HardFault_Handler
  • ¥15 关于#python#的问题:自动化测试