Can I convert .apk files to html5? - android

Can I convert .apk files to html5?
I need to modify an existing app, but don't know how to handle .apk.. if there is any tool that can covert it into html5 tht would save me.
Let me know..
Thanks.

An apk file is just a jar file for Android. You can unpack it using unzip, jar, etc., which will extract any HTML files within (if any).
If the app you're trying to work with isn't actually an HTML5 app, then there probably won't be any HTML files for you to play with. There is no automatic way to convert a native app to HTML5.

No, you can't, some tool can help you to decompile apk to java, but not HTML5

.apk files cannot be converted to .html files.

You cannot do it Straight away.. First you should get the Source Code of an APK then you should check whether the www or assets folder contains HTML Codes. If the App is created through PhoneGap you can do that.. Best of luck!

You can extract your apk file.
Then go to that folder and click on the assets folder in which you will find your www folder.
So in your www folder you will find your html, js, css files.
But the main thing is that
your project must be the phonegap project or hybrid project.

i tried using "apk editor.apk" and i also opened the assets folder and i saw a bunch of xml , html and some other files, then you can see some html5 files. here is the link to download apk editor
https://apkpure.com/apk-editor-pro/com.heagoo.apkeditor

Related

Unity - files .txt in Project are hidden into the .apk?

If I have a .txt file in a project folder of an Android project and I build this project as .apk. This file is accessible for the user from the Device Explorer or in hidden into the .apk?
(I apologize for my english)
You can also access the streamingAssetsPath (read only):
https://docs.unity3d.com/ScriptReference/Application-streamingAssetsPath.html
and the persistentDataPath (this is a folder where you can read/write data, accessible to your users... but you can access this folder only after the installation):
https://docs.unity3d.com/ScriptReference/Application-persistentDataPath.html
To read files in the streamingAssets on Android you need to use WWW class but everything is explained in the docs (with an example).
Read this to understand if you really need to use Resources folder or it's better to use streamingAssetsPath:
https://unity3d.com/learn/tutorials/topics/best-practices/resources-folder
if you want to undestand the difference I suggest to read this:
https://forum.unity.com/threads/resources-vs-streamingassets-for-mobile.494804/
Unity will produce a .apk-file.
Your .txt-file will be baked in if:
Its referenced by something in the scene
Its in the Resources folder

can asset folder be accessed by the user when the apk is installed?

For example i have an android program which contains important files in the assets folder , can the user who installed the apk access the assets folder or not ? for hacking purpose
Anyone can open your .apk just by changing the extension to .rar, what you can do to protect your code is releasing it using proguard rules, but still in that case an image for instance in the drawable folder can be compromised, however an string in your strings.xml is bit more protected.
Anyone can decompile your app and can see a lot of things including your assets. .apk file is just an compressed file which can be extracted easily.

How to load data file in Cordova plugin?

I am developing a Cordova plugin that comes with some data files. I need these files to
Be copied to the mobile device, and
Be loaded the files in the runtime.
What I am currently doing is to define these files in plugin.xml as resource files, like:
<resource-file src="assets/data.xml" target="assets/data.xml"/>
However, I do not know how to open these files in my Android Java code. If I use a File class to open the file, what path should I use?
Any help is appreciated.
Since no one has answered this question after a few days, and I have not found a solution elsewhere, I am going to post my own workaround here.
Package all the data files with directory in a zip file.
Put zip file in the Cordova app.
When the app starts up for the 1st time, the app uploads the zip file to the plug-in, using a FileTransfer plug-in.
The plug-in unzips the file in the application's sandbox.
I have to admit that this is not a decent solution. It makes the plug-in depend on the app. However, if there is no better solution, this one just works.
Still, if there is a better solution, please post share it here.

Using a linked file in Assets directory - FileNotFound Exception

I am trying to link to an external file from a shared repository between my iOS and Android apps. This does not present a problem for iOS, but it does for Android. My current solution is to create a copy of the file from the external repository and place it in my projects Assets folder. This solution works, but is not much of a good one in my opinion and involves too many extra steps.
Using Eclipse, I am able to link to a resource. It's as simple as copying a file into my Assets folder and being prompted to either copy the file or link to the resource. If I link to the resource and try to run my app, I get a FileNotFoundException. If I copy the file instead, the app file is found just fine.
Ideally, I'd like to link to the file so that when I pull a new update from git then I don't need to copy the file over every single time. I'd prefer to link to the file.
I don't know what Eclipse uses "under the covers" for "Link here" drag-and-drop stuff. However, it is an Eclipse-ism. Android's build tools are fairly isolated from Eclipse proper, and so they won't know about those links.
Using a hardlink, or perhaps a symlink, at the OS X filesystem level should work, as both Eclipse and Android's build tools should treat it like a local file.

change html file but apk not update in cordova

I am new in use phonegap, i create an app but i don't know how can i change html file to my purpose? when i changed index html file in www folder in HelloWorld/www and run again program via Eclipse, i see defualt apk file, i dont see any changes! I want to write a sample app for send and receive SMS but i can't, i can't change html file. Can you help me? or send a simple tutorial about create and change js or html file in www folder?
If i cant create this or simple change this, phonegap is not a good thing for use cross platform!
Thanks for your advises :)
If you make changes in the root www folder, you won't see changes in eclipse or apk built by eclipse unless you run cordova prepare or cordova build to copy the files from /www/ to /platforms/android/assets/www.
You can automate the execution of the prepare command and the refresh, take a look at this response:
https://stackoverflow.com/a/25361187/591254
Check files permissions, the project files must have your user permissions.

Categories

Resources