New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot specify --frame-path on apktool b[uild] #538

Closed
iBotPeaches opened this Issue Mar 18, 2015 · 4 comments

Comments

Projects
None yet
1 participant
@iBotPeaches
Owner

iBotPeaches commented Mar 18, 2015

Original issue 427 created by jseibel@apperian.com on 2013-03-14T20:44:13.000Z:

You are allowed to specify a location of the framework folder for apktool d[ecode] using --frame-path. However, apktool b[uild] requires the framework folder in the home directory, and there is no way of specifying a different directory like for decode. If it isn't accessible, you get errors like this (....'s are my own):

Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [/home/..../aapt, p, --min-sdk-version, 4, --target-sdk-version, 15, -F, /tmp/APKTOOL4290744854266415916.tmp, -0, arsc, -I, /var/www/apktool/framework/1.apk, -S, /tmp/tmpbpYpHT/..../res, -M, /tmp/tmpbpYpHT/..../AndroidManifest.xml]

Our operations team wants the framework folder checked into source, not located in the home directory. In fact, the linux user executing apktool doesn't have write permission to the root of their home directory, so they can't create the default one on the fly.

You allow specifying --framework-path for decode, doesn't it makes sense to have symmetry for build as well?

What steps will reproduce the problem?

  1. Delete the directory ~/apktool
  2. Disable write permissions on the user's home directory
  3. Observe how you cannot build anymore

@iBotPeaches iBotPeaches self-assigned this Mar 18, 2015

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #1 originally posted by connor.tumbleson on 2013-03-14T21:07:30.000Z:

Confirmed.

Making a new user (in this case "brandon"), then chown-ing his /home folder to root prevents rebuild.

output: http://pastebin.com/kwedBQqr

2 ways to fix

  1. Include the --frame-path into apktool.yml and read that during re[b]uild, if its not present try and pull from $home.
  2. Require the use of --frame-path again on rebuild.

Any opinion on a preferred method?

Owner

iBotPeaches commented Mar 18, 2015

Comment #1 originally posted by connor.tumbleson on 2013-03-14T21:07:30.000Z:

Confirmed.

Making a new user (in this case "brandon"), then chown-ing his /home folder to root prevents rebuild.

output: http://pastebin.com/kwedBQqr

2 ways to fix

  1. Include the --frame-path into apktool.yml and read that during re[b]uild, if its not present try and pull from $home.
  2. Require the use of --frame-path again on rebuild.

Any opinion on a preferred method?

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #2 originally posted by jseibel@apperian.com on 2013-03-14T21:15:16.000Z:

I would prefer option (2), the command line method, for clarity. It could be possible to do both: putting it into apktool.yml on decode, and allowing you to overwrite that on build with the flag. But whatever you want to do, thanks so much.

Owner

iBotPeaches commented Mar 18, 2015

Comment #2 originally posted by jseibel@apperian.com on 2013-03-14T21:15:16.000Z:

I would prefer option (2), the command line method, for clarity. It could be possible to do both: putting it into apktool.yml on decode, and allowing you to overwrite that on build with the flag. But whatever you want to do, thanks so much.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #3 originally posted by connor.tumbleson on 2013-03-14T21:56:08.000Z:

Let me know if this works.

69ee710

I've attached a SNAPSHOT build of this

Owner

iBotPeaches commented Mar 18, 2015

Comment #3 originally posted by connor.tumbleson on 2013-03-14T21:56:08.000Z:

Let me know if this works.

69ee710

I've attached a SNAPSHOT build of this

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #4 originally posted by jseibel@apperian.com on 2013-03-14T22:20:55.000Z:

Worked great! Perfect, thanks so much for your quick response and fix.

Owner

iBotPeaches commented Mar 18, 2015

Comment #4 originally posted by jseibel@apperian.com on 2013-03-14T22:20:55.000Z:

Worked great! Perfect, thanks so much for your quick response and fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment