Decompiling apk using apktool - apk

I need to decompile & recompile an apk on windows...
I am following this link Reverse Engineer APK
The issue is I can't find the file that makes requests (refer to above link)"Find the file that makes requests grep -r "RequestUtil.java" "
I tried using WindowsGrep software, but unable to find such file.
I don't know if I am on the wrong track.
Any help will be appreciated.
Thanks

After decompiling apk, change directory to the com.instagram.android/smali: cd com.instagram.android/smali
Search RequestUtil.java by Windows search or following command in command prompt: dir /s *RequestUtil.java*
If the RequestUtil.java not found, it does not exists! Make sure you decompile the correct version of apk.

Related

Downloads folder from JupyterLab

I'd like to download a folder of pickle files from Jupyterlab (running on a google cloud instance) and I'm unable to find a way to do so. Apparently, downloading individual files is permitted but I have about 500 individuals pickle files in my folder to download and so would take while to do that manually.
As you can see in the menu below (when right click on the folder I want to download) I manage to install a "download folder as archive" extension but for some reasons the resulting zip format is unreadable locally.
I'm sure there must be a way of downloading folder easily from Jupyterlab and any help would be highly appreciated.
Thank you
I finally find a solution by zipping the folder using the following command:
zip -r example.zip original_folder
And it worked.
On you notebook try this
!zip -r example.zip original_folder
by adding ! you tell the notebook that you wanna execute external commands
You can also open a bash terminal, pack all desired files into an archive
tar -czf ARCHIVE_NAME.tar.gz FOLDER1 FOLDER2
and then download them. It might be necessary to move the archive into your virtual home folder in order to see it in the file browser on the left side though.

Boost 1.60.0.tar.bz2 not extracting correctly

Forgive me for any silly mistakes but I'm very inexperienced. I have a file boost_1_60_0.tar.bz2 and am trying to extract it to /usr/local using the command
tar --bzip2 -xf ~/Downloads/boost_1_60_0.tar.bz2
When I try to do this it gives me over a thousand errors each with the same basic format like this example: boost_1_60_0/doc/html/boost_asio/reference/serial_port_base/: Failed to create dir 'boost_1_60_0'Can't create 'boost_1_60_0/doc/html/boost_asio/reference/serial_port_base'
When I do this I have cd'd into usr/local. Thank you for your help.
You don't have permission to write into /usr/local as an ordinary user.
Instead you should extract to a build directory, for example under your home directory, and then follow the boost build and installation instructions in the "getting started" page. That will put the files into /usr/local with a reasonable structure.

Why won't APKTool execute?

I was using APKTool and have been doing a lot of trials, using all the versions of APKTool. However, upon to my dismay, it won't work. Whenever I use it it will just be:
-bash: ./apktool: No such file or directory
I don't know what to do, as I tried using "./" as what websites are telling me, but still it just gives me this.
What should I do to fix this error. Thanks :)
-----Edit (December 23, 2015)-------
I have found the solution to the problem and it was just a redownload of APKTool itself. It also helped when I gained an understanding of Terminal and the Command Line Tools. I advice you to do the same thing too.
Perhaps you should reinstall apktool. You can find how to do it here:
http://ibotpeaches.github.io/Apktool/install/
Using "./" means that you want to run file located in current folder. Since you mentioned "bash" your apktool should be probably installed in "/usr/local/bin" so when you complete the installation do not add "./" just type "apktool" to run it.
If you want to check where apktool is installed run "which apktool"
or simply use the apktool online: http://www.javadecompilers.com/apktool
No installation - no hassle!

Apk decompile error: d2j-dex2jar command not found

I try to get source code from an .apk
I followed the steps from right here
Is there a way to get the source code from an APK file? but on Step 2.4 when I wrote on my cmd dex2jar path> d2j-dex2jar classes.dex I get
"'d2j-dex2jar' is not recognized as an internal or external command, operable program or batch files."
any solutions ?
for dex2jar 2.0 version please follow below steps to generate jar
download dex2jar (https://sourceforge.net/projects/dex2jar/files/)
extract folder
goto folder in command prompt
chmod u+x d2j_invoke.sh
chmod u+x d2j-dex2jar.sh
put desired apk to decompile in dex2jar folder
sh d2j-dex2jar.sh -f -o output_jar.jar my_app.apk
This will generate output_jar.jar in same folder
Use dex2jar classes.dex instead of d2j-dex2jar classes.dex
And please check which version of dex2jar is with you.
if it is dex2jar-2.x jar file then , please try to download dex2jar-0.0.9.15 jar file.
Add permission with: chmod +x d2j-dex2jar.sh
Then run it with: ./d2j-dex2jar.sh app.apk
place all the apk file, coverted zip, apktool, apktool install, dex2jar, jd-gui folders under a single folder...
open command prompt(admin)..
then goto the directory of your newly created folder..
then type... d2j-dex2jar classes.dex , press enter...
thats it ur problem is solved...cheezzz
no need to add any xtra permissions...it workwed for me..it'll work for you too...
If you have downloaded the d2j-dex2jar-2.x then it would not contain the d2j-dex2jar.sh file
so, try to download the dex2jar-0.0.9.15 from the link
dex2jar-0.0.9.15
Finally extract this zip file and you will find the d2j-dex2jar.sh file.
Hopefully this will help you!
Just goto the folder where you put your classes.dex file then just run the command in command prompt
http://i.stack.imgur.com/8X3aP.png
-Make sure you have downloaded the dex2jar latest version which is dex2jar-2.0.
download it with this link
https://sourceforge.net/projects/dex2jar/
-It will then make your classes.dex file to executable jar 'classes-dex2jar.jar'
you must use dex2jar-0.0.9.15 to decompile apk older version dos'nt work correctly because missing some files via extension bat

configure command not found cygwin

This question has been asked many time but I am not able to resolve the problem from them so I am asking
I had installed Cygwin a few days ago.I tried using ./configure command but it says
-bash: ./configure: No such file or directory
I tried using
where configure
but I got the output
INFO: Could not find files for the given pattern(s).
then I tried grep configureand I got this output
/etc/bash_completion.d/configure
/usr/i686-pc-cygwin/sys-root/usr/share/libtool/libltdl/configure
/usr/share/ELFIO/configure
/usr/share/libtool/libltdl/configure
I tried to export the path and then run the ./configure but it also didn't worked.
I find no executable file named as configure in my cygwin bin directory.
Does it mean that I have to add configure file manually?How can I correct it?
NOTE :- I had also tried sh configure but it also didn't worked
If a software project is set up to be built using autoconf, that tool generates a script canonically called configure. It queries the system for various parameters that are subsequently used in the build, and is specific to the software package to be built. Different software projects have different configure scripts. They are all called configure, but their contents are not the same.
So, to actually build such a software project once that script was set up (usually done by the maintainers when packaging the source tarball for distribution), you call:
tar xzf <tarball>.gz # or xjf <tarball>.bz2 or whatever
cd <sourcedir> # the one you just untarred
./configure
make
make install
Note the prefix ./, which means "located in this directory" (i.e. the top directory of that project's source tree).
Actually, the better procedure is the so-called "out-of-tree build", when you set up a different directory for the binaries to be built in, so the source tree remains unmodified:
tar xzf <tarball>.gz # or xjf <tarball>.bz2 or whatever
mkdir builddir
cd builddir
../<sourcedir>/configure
make
make install
So, there is supposed to be no configure executable in your PATH, you are supposed to call the script of that name from the source tree you are trying to build from.
If I correctly understood...
Configure is not an application that should be installed on your system, but script that should be delivered with source code to prepare for make command. File named configure should be in the main directory of source code.
I understand that this is an old question. However many might find this solution helpful.
Normally we use the make command to compile a downloaded source in cygwin. In many cases it contains a autogen.sh file. Running that file with
bash autogen.sh
will in many case solve the problem. At least it solved my issue and i could then use the make command

Resources