-
Notifications
You must be signed in to change notification settings - Fork 9
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
Updated documentation and fixed issues #4 and #5. #6
base: master
Are you sure you want to change the base?
Conversation
one bug identified.
expectation: a folder @ May be using realpath could be a solution |
apk2java
Outdated
|
||
if [[ $# -eq 2 ]] | ||
then | ||
if [[ "$2" != /* ]] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is where we need to see if the $2 is relative or full path and then append the full path. may be realpath or grealpath (in case of mac) in this case would be helpful.
@anantshri I have (hopefully) fixed the bug mentioned here. For testing, I mimicked following scenarios: Either the source or destination could be in current path, an absolute path or a relative path. Below are the situations and output: Note: For the tests, assume working directory as:
$ ./apk2java /tmp/com.domobile.applockwatcher.apk
APK_DIR_PATH: /tmp
Source dir: /home/android/Desktop/apk2java/com.domobile.applockwatcher.apk_src/
$ ./apk2java /tmp/com.domobile.applockwatcher.apk "./test"
APK_DIR_PATH: /tmp
Source dir: /home/android/Desktop/apk2java/./test/com.domobile.applockwatcher.apk_src/
$ apk2java /tmp/com.domobile.applockwatcher.apk /tmp/testcase/
APK_DIR_PATH: /tmp
Source dir: /tmp/testcase//com.domobile.applockwatcher.apk_src/
$ apk2java ../apks/com.domobile.applockwatcher.apk /tmp/testcase/
APK_DIR_PATH: /home/android/Desktop/apks
Source dir: /tmp/testcase//com.domobile.applockwatcher.apk_src/
$ apk2java ../apks/com.domobile.applockwatcher.apk ../../Desktop
APK_DIR_PATH: /home/android/Desktop/apks
Source dir: /home/android/Desktop/apk2java/../../Desktop/com.domobile.applockwatcher.apk_src/
$ apk2java ../apks/com.domobile.applockwatcher.apk
APK_DIR_PATH: /home/android/Desktop/apks
Source dir: /home/android/Desktop/apk2java/com.domobile.applockwatcher.apk_src/
$ apk2java com.domobile.applockwatcher.apk /tmp/testcase/
APK_DIR_PATH: /home/android/Desktop/apk2java
Source dir: /tmp/testcase//com.domobile.applockwatcher.apk_src/
$ apk2java com.domobile.applockwatcher.apk ../../Desktop
APK_DIR_PATH: /home/android/Desktop/apk2java
Source dir: /home/android/Desktop/apk2java/../../Desktop/com.domobile.applockwatcher.apk_src/
$ apk2java com.domobile.applockwatcher.apk
APK_DIR_PATH: /home/android/Desktop/apk2java
Source dir: /home/android/Desktop/apk2java/com.domobile.applockwatcher.apk_src/ Let me know if this works for you. |
@anantshri @c0dist Why hasn't this been merged? :X |
@roblav96 Thanks for the reminder. This completely skipped my radar. I will be looking at in next 2-3 days and will get this added in. |
@anantshri Such a useful tool! :D Thank you! |
No description provided.