Still looking for a (currently working) way to remove extra Android permissions

Same deal as several previous threads. I note further that the instructions for removing unused permissions that are usually linked appear to be incorrect; they refer to apktool as a part of the Android SDK (it’s not), they use backslashes for paths on OS X (that doesn’t work), and at least one report says that since the switch to the v20 Android SDK, they just don’t work anyway – apktool does not successfully recreate the .apk file.

So I need help with this. I had a friend try out a pre-release version of my app, and not only did it report that it needed network access, it apparently accessed the network at least some. This is not acceptable! I need to ship an app that ABSOLUTELY DOES NOT contain any of the ad network files, any of their code, or anything else like that. It must not claim it needs any permissions that I’m not using. I don’t see any way to do this from here.

And yes, this really is that important. This is a complete and total show-stopper for now; there is no way I can interest people in a “free” app which demands all sorts of permissions and which I cannot prove to them won’t do anything with those permissions.

So.

  1. How do I rebuild an APK using tools that are currently available and will work with the current Corona toolkit?
  2. How do I remove all traces of the toolkits and libraries I’m not using?

It really doesn’t seem like it should be THAT hard to rebuild an APK without files that are never in any way used… [import]uid: 143026 topic_id: 31086 reply_id: 331086[/import]

If you can use Corona build 840 or earlier, there is a way. If you can’t, there isn’t. [import]uid: 160496 topic_id: 31086 reply_id: 124290[/import]

Interestingly, I have actually succeeded using the current version (1.5.0) of apktool – at least it seems so. But this is ridiculous; I shouldn’t be hand-editing XML files to make an app that doesn’t demand absolute control over a user’s device for features I don’t want. [import]uid: 143026 topic_id: 31086 reply_id: 124293[/import]

Where do I get the 1.5.0? I saw latest one was 1.4.10… [import]uid: 160496 topic_id: 31086 reply_id: 124303[/import]

Good question! I found one buried in a thread somewhere on some forum, posted by some guy.

Seriously, that’s all I remember. I don’t recall seeing any updates on the nominal official site.

This is… well, I’ll stick with “suboptimal”. [import]uid: 143026 topic_id: 31086 reply_id: 124305[/import]

Hm… I found that post, downloaded the apktool, will try it on latest build of Corona, see if it works. If it does, it will help me with some headaches. Thanks for the info. [import]uid: 160496 topic_id: 31086 reply_id: 124307[/import]

Ok I downloaded latest daily build of corona, compiled APK, ran it through the new apktool and…

(drumroll)

it worked. Yay. I am not tied to build .840 anymore. I think I will go send a donation to the guy that released the 1.5.0.

And thanks again for the info, seebs. [import]uid: 160496 topic_id: 31086 reply_id: 124312[/import]

@mike470 - Would you mind sharing the correct link to download the unique apktool that so now works with Corona?

EDIT: Does it work on Mac?

Thanks,
Rodrigo. [import]uid: 89165 topic_id: 31086 reply_id: 124313[/import]

I always use apktool on Windows, so no idea about Mac (although they do have the ver for Mac)

http://forum.xda-developers.com/showthread.php?t=1755243

A little down it gives this link for apktool.jar: http://miui.connortumbleson.com/other/apktool/apktool_1.5.0.jar

And also says you need new aapt.exe - take the one for your OS.

I took those, replaced mine with it (renamed the apktool_1.5.0.jar to apktool.jar) and ran the normal removal stuff. Worked, and the resulting APK works now instead of crashing like it did before.

Make *sure* you replace the right files. For example, since I used the apktool scripts, I had those aapt.exe and apktool.jar files in two places. [import]uid: 160496 topic_id: 31086 reply_id: 124315[/import]

@mike470,

Really appreciate your explanation about this.

I`ll look carefully into this (for mac) and see if I get it to work as you did. :slight_smile:
Thanks,
Rodrigo. [import]uid: 89165 topic_id: 31086 reply_id: 124320[/import]

Alright, I’m jealous.

I can’t seem to get it to work. I am still running into that same lua error.

I’m on a mac.

I think I installed it correctly. Because when I run apktool, it says it is v1.5.

mike470, I know you mentioned you are on Windows, but where were the two places you had the apktool.jar and aapt files? [import]uid: 94868 topic_id: 31086 reply_id: 124570[/import]

One was in /Windows directory, the other was under the apktool scripting tool, in the “other” directory…

You can do a disk search, right? [import]uid: 160496 topic_id: 31086 reply_id: 124595[/import]

lol, yeah I did a search disk. But when you mentioned that I realized that the native mac search doesn’t actually search hidden files. So I found some other application to do that search, but that didn’t turn up any new files that I needed to replace.

So it would seem I replaced everything. Hmmm…

Well I’ll try it on some other projects later. And I’ll try setting it up on a Windows machine too, when I get a chance (maybe next week or so).

Thanks for the follow up. [import]uid: 94868 topic_id: 31086 reply_id: 124620[/import]

Hey, I know the frustration of not being able to use the latest build because of this.

Hopefully this will be good for a while. Until powers that be hopefully give us the option not to include all those things in the APK. It’s supposed to be on the “todo” list.

So - with 1.5.0 what doesn’t work for you? Did you try decompile/recompile without changing anything? How does the resulting APK fail - does it fail to install, or does it fail after install when started? With what message? [import]uid: 160496 topic_id: 31086 reply_id: 124628[/import]

If you can use Corona build 840 or earlier, there is a way. If you can’t, there isn’t. [import]uid: 160496 topic_id: 31086 reply_id: 124290[/import]

Interestingly, I have actually succeeded using the current version (1.5.0) of apktool – at least it seems so. But this is ridiculous; I shouldn’t be hand-editing XML files to make an app that doesn’t demand absolute control over a user’s device for features I don’t want. [import]uid: 143026 topic_id: 31086 reply_id: 124293[/import]

Where do I get the 1.5.0? I saw latest one was 1.4.10… [import]uid: 160496 topic_id: 31086 reply_id: 124303[/import]

Good question! I found one buried in a thread somewhere on some forum, posted by some guy.

Seriously, that’s all I remember. I don’t recall seeing any updates on the nominal official site.

This is… well, I’ll stick with “suboptimal”. [import]uid: 143026 topic_id: 31086 reply_id: 124305[/import]

Hm… I found that post, downloaded the apktool, will try it on latest build of Corona, see if it works. If it does, it will help me with some headaches. Thanks for the info. [import]uid: 160496 topic_id: 31086 reply_id: 124307[/import]

Ok I downloaded latest daily build of corona, compiled APK, ran it through the new apktool and…

(drumroll)

it worked. Yay. I am not tied to build .840 anymore. I think I will go send a donation to the guy that released the 1.5.0.

And thanks again for the info, seebs. [import]uid: 160496 topic_id: 31086 reply_id: 124312[/import]