Unlock APK files in Android Studio for editing - android

Newbie here!
I have downloaded the .apk to Android Studio to make some changes to the code. I want to add a requirement for a user to insert 'a memorable word' when they register. But when I try and edit the required file, I just get an alert box telling the file is read only. I have tried to alter this in the panel but to no effect. It is possible the previous developer locked the files. How do I go about editing from this point forward, if the developer has locked the files, on which file/folder do I alter to make the files editable.

The .apk file you have is a compiled version of the code. Android studio can decompile this for you when you import it to view the content, but you cannot edit the decompiled code directly.
Your best bet is to acquire the original source code. Other option is to try decompiling and recompiling the .apk like explained in this post.

Related

Android Studio - Modding Firefox search suggestions error - "Files under the "build" folder are generated and should not be edited"

I'm modifying the Firefox Android App. I'm trying to change the search suggestions feature from Google to another search engine. To do this I have to change 2 files
The first file I change is:
fenix/app/build/intermediates/merged_assets/debug/out/search/list.json
The second file that I add is:
app/build/intermediates/merged_assets/debug/out/searchplugins/test.xml
After I make these changes and run the app in the emulator to test it out, the changes that I make are reversed/undone/overwritten, and the notice pops up saying "Files under the "build" folder are generated and should not be edited".
What should I do to make my changes save here? Why are the files being reverted back to before I changed them?
Thanks for your help

Password protect Android Studio project

I am a full time Android Developer and in the current firm I am working at, I have found my system to have modifications that I didn't perform(when I turned it on the next morning) . I am okay with casual modifications(if at all) but am afraid that if my Android projects may get "stolen", it may get out of hand.
So, without making this a workplace issue, I would simply like to password protect my source.
How can I achieve the same?
I don't think there is such option in android studio but you can do it so easy. After writing your project you can save it as password protected Archive file using 7zip
Go to your project, right click your project folder>>7-Zip>>Add to archive>>Encription>>Add your password>>save. Then delete your project folder after saving and closing android studio.
[Do not use export option in android studio because you will need do download all external libraries next time you open it and there is no password protection]

Changing display name of an Android app by modifying its apk file - (Android 5.0)

I am trying to change the display name of an Android file (the name shown on the screen once the app is installed). I only have the apk file*.
When I unzip the apk file, it's partially binarized. I know that to change the display name, I have to change the AndroidManifest.xml file, but that file is partially in binary.
If I unzip an application, change something (or nothing!), zip it back up, sign and zipalign it, the application does not work anymore. It doesn't install, but crashes while trying, claiming Parse Error - There was a problem while parsing the package.
If I unzip the application using ApkTool, change something (or nothing) and rezip it using the apktool b apkFolder -o changedApk.apk, then sign and zipalign it, the app does install, my changes seem to be present, but the app crashes the moment it opens up. The stacktrace seems to indicate that the following is the problem:
F/monodroid(12679): No assemblies found in '(null)' or '/storage/emulated/0/Android/data/Geocortex.App/files/.__override__'. Assuming this is part of Fast Deployment. Exiting...
If I rezip the application using the apktool b apkFolder (thus to place the changes in the original apk file), sign and zipalign, the application installs and works, but none of my changes are present. The last modified date on the apk actually doesn't even change, so it seems like the tool does nothing.
ApkTool seems to have been successfully used in the past by many others to do the same thing as me, but now I am wondering if perhaps it wasn't updated to the Android L version.
I also noticed that the original unchanged apk is about 3 mb bigger than the output from both the apktool and the regular rezip. As another side note, I am using the original key, keychain, password to resign the app.
Does anyone know how to do this, or why the application might be crashing? Does the apktool work for Android 5.0+? Any insight is greatly appreciated!
*Details about the source of the apk and my authorization (as requested by Chris in his comment): This particular application belongs to the company I work for (so yes, I do have the entire source code and could change the AndroidManifest.xml file there). However, this application is distributed to our limited clients manually. This application does not exist in the app store and every version is manually changed to suit a certain client's desires (e.g. specific app names or icons that match their company). In order to alleviate some of the developer's work load, I am creating a Windows Program that can do all these changes automatically and the work for our team would be as easy as having to type in a new name in a textbox. At the end of the project, I plan on having a Windows tool that can take the current version of our application (in its apk format), change the app name or display icons which were inputted in simple text fields, and output signed and zipaligned application that can be easily sent to our customers.

Is there a way to add such folder in Android project that do no get compiled up to **apk**

I was looking for a way to add some such folder in my Android Project that do no get compiled up to my apk file.
Why I need it :-
We need to maintain proper documentation for project (that actually
everybody needs to ;) nothing new),
but I find it very irritating to look out for that documentation
folder again and again.
.
I am open for any way i can make dcocumentain folder easily one
click accessible (I am already doing it thru taskbar sortcut. ) But
I want it to get the ease of version control thru Eclipse likewise we
do it for our project
IDE :- Eclipse
I got a way myself :-
I had an idea that if I create a folder in my application project with
some anonymous name that actually android has not listed in its
directories ("I am talking about the default one like "res", "src",
"anim"......)
Then either it should "raise an error" or should "ignore" it while compiling to form apk file
luckily it ignores any such folder. now i can put all the documentation in my project.
NOTE:-
My answer empirically driven
I had tested it by creating a "Docs" folder and then copied 1 GB of
random data (includes almost all type of files we came across from
multimedia to zipped ones).
Then I build the apk and the size of the apk was in-effective of all
this..
but when i copied the same data to assets it was showing a huge change
in size of my apk file..
Consider using Javadoc in addition or, if possible, instead of any other documentation.

How do I open a .apk google example?

Ok so I want to learn android push notifications. I found at android to use the C2DM service.
http://code.google.com/android/c2dm/
Great they even give me an example. http://code.google.com/p/jumpnote/downloads/list
My problem is I don't know what to do with the file after I download it. :P
It is an .apk file. So how do I open it in eclipse to learn from it?
An apk is an android install app thingy you run it on your phone. To edit search android code examples and select the first one select what you want to edit dowbload the manifest and the other files and edit them in eclipse. Have you ever tried opening a .exe in notepad it does not work so well because it is already compiled same (i think) with the. Apk also make sure you have the android plugib for exlipse. Sorry for the strange language I am a delvoper who forgets the name of everything. And the grammer i am only 13.
Rename it to .zip and you can open it with your favorite zip unarchiving program.

Categories

Resources