I have made a bash file which makes a code command similar to that of VS code's code command.
I want to launch the SPCK editor to the specific project folder I want instead of opening the app from start. I want to know the activity class name or something like that for it. Can anyone help?
Try inputting cd storage/shared/android/data/io.spck/files in your termux terminal or if you had installed the spck editor in another space disk use the termux-setup-storage to select the storage and run the first command. Then to select your project's name cd projectName. You can now call your preferred command to install packages into the selected project file, you can input ls to see the whole spck files.
Related
I am developing an application using ionic framework.
The app creates files (*.json) and stores them in /data/user/0/ when i verify whether they exist or not, the result was true which means the files exist in the mentioned directory and I can access and modify their content without problem, but when I check the directory with a file manager or from the computer, no result, the directory is empty.
Could someone tell me what should I do?
use adb to copy the file. Even if it's in root dir, u should have access to it via adb.
Do adb pull data/user/0/filename.json path_on_ur_comp.json.
this will copy the file to the directory you define in the 2nd parameter.
// EDIT:
adb is part of the Android SDK, stands for Android Debug Bridge.
You can use this for MANY MANY different reason but of course, the "main" reason is to debug Android devices. You can use it to transfer files in your case.
In Windows, it's located here:
C:\Users\USERNAME\AppData\Local\Android\sdk\platform-tools\adb
In Mac, it's lcoated here:
/Users/USERNAME/Library/Android/sdk/platform-tools/adb
Depending on which OS you use, open that either with Terminal (Mac) or Command Prompt (Windows).
Once you do that, run the following command:
For Mac:
adb pull data/user/0/filename.json /Users/USERNAME/Desktop/somefile.json
For Windows:
adb pull data/user/0/filename.json c:\Users\USERNAME\Desktop\somefile.json
This will copy the file and put it on your desktop
I'm trying to integrate Google Sign-in into my app, and I'm following this tutorial. However, I'm trying to add the configuration file to my project, and the tutorial says that I should use this command:
$ move path-to-download/google-services.json app/
When I open the terminal in Android Studio and write the command it says:
'$' is not recognized as an internal or external command
I've also noticed that it's similar to Command prompt (I'm using Windows). Can I just copy the .json file and paste it in my app folder?
I believe $ (dollar sign) is indicating a start of new line in Unix based OS terminal. In Windows OS, the command should be
MOVE [Source] [Target]
For more information, check this link.
Or you can just copy and paste it in your app folder. That will be suffice as well as.
'$' is the user prompt, You should omit the '$' and the command should work
I am newbie to the android development. Just out of curiosity i was wondering if it is possible to get back installed .apk file from android emulator ???
The question linked by #thepoosh indeed has some correct answers to your question, but it is not the accepted answer. Scroll down a bit to answer of either #plaisthos or #Pratik.
In short: your .apk resides in the /data/app directory on your emulator. Note: It probably has a name that differs from the name of the .apk file on your build machine, since the .apk get renamed to something that looks like your package name.
So, using adb shell:
- cd /data/app
- ls (and check the name of your .apk file)
- exit adb shell
- on commmandprompt: adb pull /data/app/your.filename.apk
Or from Eclipse use the fileexplorer tab as stated by #Pratik in the other thread.
you can copy the route if you are working in eclipse, the apk that you install in the emulator is the same that is in your project when you compile it, go to folder bin, select .apk ctrl+c and paste in your desktop for example.
How to extract the apk file from device:
First run your emulator.
if you are in windows, open cmd and go to platform-tools : in my case
cd C:\Program Files (x86)\Android\android-sdk\platform-tools
after that run adb as:
adb pull /data/app <the directory where do you wannt to save>
example:
adb pull /data/app C:\Users\tato469\Desktop\app
Access this folder and select your app.
NOTE: Look if only one emulator is running, else it will throw an error.
Are you trying to run the app on a device or do you just want the .apk?
TO run it on a device:
1) Click the project
2) Go to Run -> Run configurations -> Target tab
3) Select Always prompt to pick device then apply.
After which everytime you try and run the application it will let you select any plugged in devices
TO get the .apk
1) Right-click project file
2) Export
3) Follow instructions
I am trying to familiarise myself with using adb from the command prompt.
My adb.exe is installed at:
C:\Program Files(x86)\Android\android-sdk\platform-tools
I have tried starting off by typing in cd:C\ to take me to the C drive
Then I have typed in the path quoted above, sometimes putting Program Files(x86) in quote marks,
other times inserting % in between Program and Files.
But always I get the same answer - "The system cannot find the path specified".
Even when I type the path and then put in “adb devices” I get nothing.
I have tried inserting each of the following in the path in system variables as follows:
;C:\"Program Files(x86)"\Android\android-sdk\platform-tools\
C:\"Program Files(x86)"\Android\android-sdk\platform-tools\
;C:\Program Files(x86)\Android\android-sdk\platform-tools
And then typing “adb devices”.
The message is the same – “adb is not recognised as an internal or external command, operable program or batch command.
You can call adb directly from the directory you are currently in: "C:\Program Files(x86)\Android\android-sdk\platform-tools\adb.exe" (With quotes!) You can also navigate to the platform-tools directory and then call adb.exe, use cd .. to go to a directory level up, you can hit TAB to let windows list the appropriate directories, this works also if one or more characters are entered.
Btw, just added "C:\Program Files\Android\android-sdk\platform-tools" to my PATH and it works just fine! Separate the entires with a semicolon.
for using a 64 bit os try going step by step,
type in command prompt
cd "C:\Program Files (x86)"
you will enter C:\Program Files (x86)directory
then type
cd Android\android-sdk\platform-tools
It's the spaces that are messing people up. Windows users need to remember one important thing when dealing with command lines: do not install the utilities to folders where there's a space in the folder name - it will save you a lot of hassle which sometimes can't even be solved by using quotes.
For example, I've installed the Android SDK to C:\Android\android-sdk-windows
To open a command prompt, I have a shortcut to ("target") C:\Windows\System32\cmd.exe
And the "Start in" path is C:\Android\android-sdk-windows\platform-tools
now all I do is double-click the shortcut and I can dive right in to ADB
I have put my compiled application in /data/data folder of my android. And I can run it through terminal emulator. How to add that application to "Application list". So, that I can see it as an icon.
Thanks
You have to "run" the app to install it. Use a program like Astro to browse to it and click the app to install it. This will place the icon in your application list.
Update
If you want to install via the terminal emulator, you have to do the following (note: you need to be root on your phone to do this).
Place the .apk on the root of your SD card (for simplicity)
Type "su"
cd into the destination of your .apk (in this case it will be cd /sdcard)
Use "install "name of .apk" /"destination"/"name of .apk"
More information here: http://bit.ly/cpnocZ