[Q] change API level on apk - General Questions and Answers

hello
can somone please help me a little. i want to change the API level from an apk to work on my 2.2 android device.
i downloaded sdk manager and downloaded the android 2.2 thingys. then i downloaded eclipse and started it and i installed the sdk following the offival development guide. but how can i now change api level off that app? can someone please give me a guide on what i need to do or if i missing some more plugins or so;ething. i am complete noob here but would like to try it to get that app to work on my device as i get parse error when trying to install.
thanks in advance

If you do not have source code for the apk (which I am assuming you don't), than I do not think you can just change the supported API level.
If the app does not support Android 2.2 (API level 8), than you can try following things:
1. Start ADB (adb.exe) from \android-sdk-windows\platform-tools and run following command
adb install <your apk file> after connecting your device to you computer.
This should install the apk. Application may crash if it uses certain API not supported in API level 8.
2. Just email the APK file and try to open your email from the device and insall there. You will sill run into the same issue of app crashing if it uses features not supported in API level 8.
Hope this helps.

Related

[Q] Eclipse ADK Beginner's Issue

I am running Linux (Ubuntu 10.10) on a 64-bit platform, and I have installed Eclipse Helios with ADK 2.3.3 & 3.0. I'm new to Android development, and am trying to run a sample app [~/android-sdk-linux_x86/docs/resources/samples/Wiktionary/...]. However, I am getting the following error messages when I Run it:
Code:
[2011-04-14 14:24:23 - Snake] Still no compatible AVDs with target 'Android 3.0': Aborting launch.
[2011-04-14 14:24:23 - Snake] Performing com.example.android.snake.Snake activity launch
[2011-04-14 14:24:46 - Snake] Launch canceled!
Where can I find an Android Virtual Machine for my Android 2.3.3 (on my 64-bit Linux)?
Hi!
You should rename your thread to "SDK",since "ADK" means a completely different on Android.
First off, can you please all steps you took to install eclipse and the sdk ?
Make sure you follow step-by-step this guide: developer.android.com/sdk/installing.html
Robson

[Q] Not able to install the SDK packages, coz SDK blinks for a sec and then closes.

So, I am sorry, if this is a stupid question, I am novice here. I am trying to run SDK manager on windows 7, 32-bit os. It's already installed. Whenever I try running SDK manager, It flashes for a sec and disappears. When I tried executing android.bat from tools, what I got was :
C:\Program Files\Android\tools>android
[INFO] Starting Android SDK and AVD Manager
'xcopy' is not recognized as an internal or external comman
operable program or batch file.
No command line parameters provided, launching UI.
See 'android --help' for operations from the command line.
Exception in thread "main" java.lang.NoClassDefFoundError:
ts/Display
at com.android.sdkmanager.Main.showMainWindow(Main.
at com.android.sdkmanager.Main.doAction(Main.java:2
at com.android.sdkmanager.Main.run(Main.java:99)
at com.android.sdkmanager.Main.main(Main.java:88)
I have java 6 up date 25 already installed and the path is already added to environ var. Also I am interested in developing for android, If anybody is interested in showing me how, I wud be very greatfull. Thanks in advance. Plzzzzzzz........ HELP.
Currently Using : HTC Desire Z.
And yes, I am having eclipse 3.2 already installed on my system. PLzz help................................., somebody......................, anybody.
General tip
If you double click some techie program on Windows and see it just appear and disappear like that, it usually means that this program is meant to be run in a command line window.
So go to All Programs -> Accessories -> Command Prompt and open that
Then go to wherever that program is installed and run it from there.
Oh, and note that Android development needs the JDK, not the JRE version of Java, The JDK contains all the extra parts needed for Java software development in general, including key parts needed by the Android SDK.
While the JRE can be downloaded from www java com , the JDK is only available from java.sun.com .
P.S.
Sorry for not making proper links, but I have not made enough posts to allow them yet.

[Guide]Setting Up Netbeans With Android[Guide]

Hi, guyz. Once again bringing you a small guide for setting up Android Dev Environment with Netbeans IDE. Personally I find Netbeans to be very easy and useful, but, it's a matter of personal preference. Many people would on the other hand prefer Eclipse IDE for the development.
If you have never used netbeans before, please
don't try to use this plug in. Wait until
you are familiar with the IDE first.
I. INSTALL AND SETUP ANDROID SDK
1. You need to download the Android SDK:
Android SDK Download
2. Install the Android SDK to C:\Android\android-sdk
3. Run Android SDK and install the recommended installations.
If you want to use your programs on your Android device, I suggest
installing the emulator for your device as well as the emulator for
the newest Android versions.
II. SETUP ANDROID VIRTUAL DEVICE(AVD)
4. In Android SDK, go to Tools> AVC Manager.
5. Create a new Android Virtual Device(Emulator). Name it whatever you want.
Set the target to the version of Android you want to emulate.
6. Set the size of the virtual SD card to whatever you want. For my first
Emulator i set it to 100 MB.
7. Set Snapshot enabled to true to speed up future loading time. This takes a
snapshot of the Emulator State on closing so that it does not go through
the startup animations.
8. Finally, click Create AVD at the bottom.
III. TEST YOUR ANDROID EMULATOR
9. Still in the AVD Manager, click Start.
10. You will see that Save to snapshot has been selected.
11. If you want it to load from that snapshot everytime, select
"LAUNCH FROM SNAPSHOT"
12. The emulator runs very slowly, especially the first time
with the startup animations. You will get used to it after awhile.
13. You should get to the menu screen.
14. After checking that everything is okay, you can test out
the emulator, or exit out.
15. Exiting saves a snapshot, which takes awhile. After taking the
first snapshot, it is okay to uncheck the "Save to snapshot". You really
don't need to do it after the first time, unless you want to save info
to the emulator for testing purposes, such as adding phone numbers, etc.
IV. INSTALLING THE PLUGIN ON NETBEANS
16. Start Netbeans. Go to Tools->Plugins->Settings
This is a list of all the places your plugin manager checks for updates.
17. Add a new update center: Android Plugin For Netbeans < 7.2
this is the home of the NetBeans Android project.
Android Plugin For Netbeans >= 7.2
18. After installing, go to Tools->Plugins->Available Plugins. There
should be a new plugin called Android. Install it. It is only about
700 kb.
NOTE: On previous versions, you had to add Android to the Tools->Java Platforms.
(I Think). You don't need to do this anymore.
19. Go to Tools->Options->Miscellaneous->Android
There is now an android tab in your options. Set the location
of your android SDK installation. Mine is C:\Android\android-sdk
20. You should now be able to create an Android Project. File->New->Android->Android Project
21. Name your Project.
22. The convention for naming an Android Package is different than for
normal Java Projects.
WRONG: "MyPackage" //ERROR!
RIGHT!: "My.Package" //GOOD!
This is what it means when it says "Package name must have at least two parts"
23. This is the source code for your main file:
package bl.ah;
import android.app.Activity;
import android.os.Bundle;
public class MainActivity extends Activity
{
/** Called when the activity is first created. */
@override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
}
24. add import "My.Package.R" where My.Package is the name of your package.
25. After Building, you can press Start to startup your android emulator.
YOU CAN ALSO INSTALL A PACKAGE MANUALLY
This is good practice anyway.
26. Use the explorer to go to your project folder. In the bin folder,
you should find a .apk file. This is the compressed version of your program.
It works sort of like a .jar file.
You can install it manually onto your emulator from the command line(start->search->cmd.exe if you haven't
used the command line before. It can also be found in c:\windows\System32 or SysWOW64
26. If you know how to set system variables, add C:\Android\android-sdk\platform tools; to your path
26.b. If you don't know how, use the commandline: cd C:\Android\android-sdk\platform tools
27. In this folder is adb.exe. This is the android debug bridge.
START YOUR ANDROID EMULATOR NOW
28. In the command prompt, type adb install C:\{path to project}\bin\{projectName}.apk
EX: adb install C:\Sean\aa1\bin\aa1-debug.apk
29. You should get 3 lines saying how large the installation file was,
where it was installed, and whether it was successful.
If it doesn't print this, either you typed in the instructions wrong, or you had an error.
Here is more information about android bridgehttp://developer.android.com/tools/help/adb.html
NOW, Run your android emulator.
There should be an app named MainActivity. It was named after the class
name. The icon is the green android.
-----------------------------
CONGRATS
-----------------------------​
Please Kindly Click Thanks For This Post
It Takes 5 Seconds To Say Thanks And Nearly A Couple of Hours To Days To Setup A Guide​

[Tool] WhatsApp Key/DB Extractor | CRYPT6-12 | NON-ROOT | UPDATED OCTOBER 2016

** Version 4.7 Updated October 2016 - Supports Android 4.0-7.0 **
SUMMARY:
Allows WhatsApp users to extract their cipher key and databases on non-rooted Android devices.
UPDATE: This tool was last updated on October 12th 2016. and confirmed working on Android 4.0-7.0 using WhatsApp version v2.16.304 (latest available).
IMPORTANT: If you wish to extract media files or WhatsApp databases from Google Drive backups then you need: WhatsApp Google Drive Extractor instead.
TUTORIAL:
BRANCH UPDATES:
v4.0 - Fixed issues with Android API 14-17 (4.0-4.2 Jelly Bean).
v4.1 - Added support for Android API 23 (6.0-6.0.1 Marshmallow).
v4.2 - Added support for specifying adb backup passwords.
v4.3 - Added PowerShell version as optional alternative to bat version.
v4.4 - Changed primary mirror for legacy apk.
v4.5 - Fixed issue pushing cipher key to emulated storage.
v4.6 - Updated primary mirror for legacy apk (again).
v4.7 - Added new sanity checks and support for Android API 24 (7.0 Nougat).
PREREQUISITES:
O/S: Windows Vista, Windows 7, Windows 8, Windows 10, Mac OS X or Linux
Java - If not installed: Download Java
ADB (Android Debug Bridge) Drivers
USB Debugging* must be enabled on the target device. Settings -> Developer Options -> (Debugging) USB debugging
Android device with Android 4.0 or higher. I.E. Ice Cream Sandwich, Jelly Bean, KitKat, Lollipop, Marshmallow or Nougat.
*= If you cannot find Developer Options then please go to: Settings -> About phone/device and tap the Build number multiple times.
INSTRUCTIONS:
Extract WhatsApp-Key-DB-Extractor-master.zip maintaining the directory structure.
Click on WhatsAppKeyDBExtract.bat (Windows) or WhatsAppKeyDBExtract.sh (Mac OS X / Linux).
Connect your device via USB, unlock your screen and wait for Full backup to appear.
Enter your backup password or leave blank (if none set) and tap on Back up my data.
Confirm backup password in your command console and then check the "extracted" folder.
TROUBLESHOOTING:
If you have never used USB Debugging before, you may also need to verify the fingerprint.
If you have set a default backup password in your Android settings, then this MUST be the
backup password that you provide when prompted to backup your data. Else it WILL fail!
Linux and Mac OS X users may need to set the script permissions as executable. Depending on the
adb permissions, you may also need to sudo ./WhatsAppKeyDBExtract.sh from your command console.
If you're having issues with WhatsAppKeyDBExtract.bat then right click WhatsAppKeyDBExtract.ps1
and select Run with PowerShell. You may have to enter "y" at first run for script execution policy.
If you get an error saying "AES encryption not allowed" then you need to update your Oracle Java
Cryptography Extension (JCE) to Unlimited Strength Jurisdiction Policy Files.
DOWNLOAD: WhatsApp-Key-DB-Extractor-master.zip
AUTHOR: TripCode
THANKS: dragomerlin for Android Backup Extractor and Abinash Bishoyi for being cool.
alternatives
Yes, this is a normal backup method. There are automatic tools that do the same without using PC, just on device side.
Apart from normal ADB method, you could use ECLIPSE for that, using the memory module, you could transfer files from and in.
If you have physical access to the device, there are many solutions.
regards.
droopyar said:
Yes, this is a normal backup method. There are automatic tools that do the same without using PC, just on device side.
Apart from normal ADB method, you could use ECLIPSE for that, using the memory module, you could transfer files from and in.
If you have physical access to the device, there are many solutions.
regards.
Click to expand...
Click to collapse
The only way to access private application files (such as a WhatsApp's cipher key) without root is the ADB method. You can backup some files on the device without a PC (APK's etc...), but there is currently no way to access private files and folders. All the "My Big Fat Backup" style apps and tools will either require root or ADB. Eclipse also utilizes ADB. Basically, device side backups of application data require root. There are no other alternatives to this. If there was, then Android would be too infeasible and insecure as a viable operating system. Physical access translates into only two solutions. 1.) The ability to root and 2.) The ability to utilize ADB (Eclipse, Bats, Exe's doing nothing more than calling a simple command line). Of course if you are aware of a 3rd method (disregarding the user interface) and is not based on root or ADB then please feel free to share.
Thanks for this tool!
I've just tried to use it, but it installs the java constantly (while java is properly installed on computer as other applications uses it without any problem )
By any chance, do you have any idea how to pass that?
Thanks!!
Mia
PS I got JDK installed and still not working
MiaNet said:
I've just tried to use it, but it installs the java constantly (while java is properly installed on computer as other applications uses it without any problem )
By any chance, do you have any idea how to pass that?
Click to expand...
Click to collapse
The bat file automatically checks for the presence of java.exe on your system. If it's not found then it starts the install. It would appear that for some reason it's not finding Java and hence why you're stuck in this loop. Please find attached a bat file without the Java check. Just put it in the same folder as the original and run this one instead. Let me know how you get on. Java also needs to be callable from the command line. To check this is working you should click on Run... within Windows, type cmd, click OK and type "java -version" (without quotes) and press Enter. This will confirm java is in the command path and print out your JRE build number. I have also updated the release in the OP and removed the Java check, as I have had a couple of similar reports of the loop issue.
Thanks again.
still showing this message attached
TripCode said:
The bat file automatically checks for the presence of java.exe on your system. If it's not found then it starts the install. It would appear that for some reason it's not finding Java and hence why you're stuck in this loop. Please find attached a bat file without the Java check. Just put it in the same folder as the original and run this one instead. Let me know how you get on. Java also needs to be callable from the command line. To check this is working you should click on Run... within Windows, type cmd, click OK and type "java -version" (without quotes) and press Enter. This will confirm java is in the command path and print out your JRE build number. I have also updated the release in the OP and removed the Java check, as I have had a couple of similar reports of the loop issue.
Thanks again.
Click to expand...
Click to collapse
Still showing the attached message
mesho_alaa said:
Still showing the attached message
Click to expand...
Click to collapse
This sounds to me like you need to update your PATH Environment variable with the directory in which java is installed.
Open up a DOS window and type: "where java" (without quotes) to determine possible locations.
If it's located in: "C:\Windows\System32" then the following code should suffice:
Code:
set PATH=%PATH%;C:\Windows\System32
If it's located in: "C:\Program Files\Java\jre7\bin" then:
Code:
set PATH=%PATH%;C:\Program Files\Java\jre7\bin
The above needs to be added to the bat script BEFORE Java is called. You can edit the bat script by opening it with Notepad.
Alternatively, you could permanently update the PATH Environment (probably a better method).
To do this you would: Right click on "Computer" or "My Computer", within Windows Explorer, choose "Properties", click on the "Advanced system settings" and/or the "Advanced" tab, then click on the "Environment Variables" button. Select the "PATH" line, click the "Edit" button, and add the relevant directory to the end of any text that exists for PATH, prefixing the java path with a ";" (semicolon) if this line already contains other string paths. If PATH does not exist then you will need to add it. Sorry this paragraph is a little double-dutch (trying to cater for multiple versions of Windows).
Many thanks! I'll test when home and let you know.
Just to let know, the path command do not fix the prior version with Java check as I first thought this might be the problem.
Thanks!
Mia
Could even be use with ADB from phone to phone? without using the pc? Or I must install the app on the phone and do it offline?
I have find my way! Re-installed Java, manually clicked on java.exe stored in Java folder in Program files (or Program files (x86) ) I've clicked on Javacpl as well and enabled all options, not sure if this is necessary though.
I've then rerun the program without Java check (the Java check one is bugging now) and was able to do the back up.
Thanks!!
Best regards,
Melanie
Cannot tap button
Hi! i've done all the previous steps, but when i unlock the phone, to confirm the backup, i cant tap on "back up my data", it doesnt even grey at hover, just like the button wasn't there...
I can choose not to backup, that button works perfectly, and write the password too, i've tried all the screen, but nothing happends, so i can't backup the phone...
Does anyone think how to solve that? Thanks!
Permission denied
Hi, I followed all instructions and I generated this error.
I would appreciate your help.
Error
mesho_alaa said:
Still showing the attached message
Click to expand...
Click to collapse
I, too am showing the same error.
Curwens said:
Hi! i've done all the previous steps, but when i unlock the phone, to confirm the backup, i cant tap on "back up my data", it doesnt even grey at hover, just like the button wasn't there...
I can choose not to backup, that button works perfectly, and write the password too, i've tried all the screen, but nothing happends, so i can't backup the phone...
Does anyone think how to solve that? Thanks!
Click to expand...
Click to collapse
Try rebooting the device and trying again. If it is still greyed out, the backup feature maybe disabled on the device. Some manufacturers / service providers have specifically disabled usb backups.
kharloz_jc said:
Hi, I followed all instructions and I generated this error.
I would appreciate your help.
Click to expand...
Click to collapse
cardinalaa said:
I, too am showing the same error.
Click to expand...
Click to collapse
It would appear that the key was extracted, but the "copy" wasn't pushed to the sdcard. KitKat? You don't need a copy of the key on your sdcard unless you want to use a supported app. As the key was extracted successfully, you could attempt to copy it by other means.
TripCode said:
This sounds to me like you need to update your PATH Environment variable with the directory in which java is installed.
Open up a DOS window and type: "where java" (without quotes) to determine possible locations.
If it's located in: "C:\Windows\System32" then the following code should suffice:
Code:
set PATH=%PATH%;C:\Windows\System32
If it's located in: "C:\Program Files\Java\jre7\bin" then:
Code:
set PATH=%PATH%;C:\Program Files\Java\jre7\bin
The above needs to be added to the bat script BEFORE Java is called. You can edit the bat script by opening it with Notepad.
Alternatively, you could permanently update the PATH Environment (probably a better method).
To do this you would: Right click on "Computer" or "My Computer", within Windows Explorer, choose "Properties", click on the "Advanced system settings" and/or the "Advanced" tab, then click on the "Environment Variables" button. Select the "PATH" line, click the "Edit" button, and add the relevant directory to the end of any text that exists for PATH, prefixing the java path with a ";" (semicolon) if this line already contains other string paths. If PATH does not exist then you will need to add it. Sorry this paragraph is a little double-dutch (trying to cater for multiple versions of Windows).
Click to expand...
Click to collapse
Hi, I am receiving the "Cannot find the path specified" error. I have tried both changing the script and also the other method, in environment variables. I am curious if this has anything to do with the fact that its an ATT phone (since no one can even root it yet)? No other apps can access my phone, either. I have USB debugging enabled and all prerequisite programs installed. Tried on 2 computers, win7 and win 8.1
I wonder if i it is an error on my part..?
TripCode said:
Try rebooting the device and trying again. If it is still greyed out, the backup feature maybe disabled on the device. Some manufacturers / service providers have specifically disabled usb backups.
It would appear that the key was extracted, but the "copy" wasn't pushed to the sdcard. KitKat? You don't need a copy of the key on your sdcard unless you want to use a supported app. As the key was extracted successfully, you could attempt to copy it by other means.
Click to expand...
Click to collapse
I have reviewed the "Extract" folder and there was the key. I have managed to decrypt it.
Thanks for the help and the tool!
PD: sorry for my bad English, I use translator is haha.
Nothing happens
Hi, first, thanks for this iniciative. A lot of people would apreciate this
I think I did everything as u said, but when I open the WhatsAppKeyExtract,bat and then conect my phone in debuggin mode to PC, nothing happens. Ive waited for 10 minutes and.. nothing happens. Keep showing the initial message: "Please connect your Android device..." and in my phone nothing happens too. Just show a messagem at the upper tab saying: "USB debbugin conected".
Theres any kind of setting to do futher in the debbug options?
Thanks
Update: I had do install de universal adb driver for my phone, and now it starts the download, but now im having problem with java... the messagem says "'java' isnt a recognizable command". I tried all solutions in this post and nothing.. I need heeeelp!
Solution to path problem
Is working perfect. For someone else that can happen the same thing as me. I have to fix something (i am spanish) about:
java is not recognized as an internal or external command, operable program or batch file
Here is the solution:
java .com/en/download/help/path.xml
Or here:
1. Right-Click My Computer and select Properties
2. Then Click The Advanced Tab
3. Then Click Environment Variables
4. Select Path In The Bottom Box and Click Edit
5. Find Where You installed Java (E.g "C:\Program Files\Java\bin)
Its different on each computer
6. Make Sure to add a semicolon after the word bin in the path to seperate it from the other important paths
7. If this doesnt work then you may have to reinstall Java and Try Again
Setting Path on Windows
For Windows XP:
1. Start -> Control Panel -> System -> Advanced
2. Click on Environment Variables, under System Variables, find PATH, and click on it.
3. In the Edit windows, modify PATH by adding the location of the class to the value for PATH. If you do not have the item PATH, you may select to add a new variable and add PATH as the name and the location of the class as the value.
4. Close the window.
5. Reopen Command prompt window, and run your java code.
https://www.dropbox.com/s/nm1goi6m0oob15u/Screenshot 2014-06-15 22.25.27.png
I am getting this error.
using java run time 7 update 60
any ideas?
Thanks!
tzuyang said:
https://www.dropbox.com/s/nm1goi6m0oob15u/Screenshot 2014-06-15 22.25.27.png
I am getting this error.
using java run time 7 update 60
any ideas?
Thanks!
Click to expand...
Click to collapse
Have seen this error before (not related to bat file). You may need to revert to an earlier Java version.

[Completed] [Q] Android emulator not responding after a while

I have a script that installs an apk file, launches it, and uninstalls it afterwards (using adb) on the android emulator. (After installation I get a response from the terminal: rm failed for -f, No such file or directory while installing, but I don't think this is a problem) I repeat this for several apk files. But when I launch the android emulator, several minutes to several hours later, the emulator is not responding anymore. The spinning pinwheel appears, the only way to quit is to kill it via the terminal (using kill -9).
I have tried to change the two possible CPU/ABI Settings of an AVD to (ARM and Intelx86), but both settings result in the same problems. I have also tried different API levels (19 and 21), but also no luck there.
As I am running the emulator on a Mac, I thought the problem may be related to my OS, so I performed the same thing on a computer running Ubuntu. The same problem appears on both devices.
I have also captured the logcat files, but there are no similar error messages across these files.
These are the parameters that I am using: Android SDK / AVD Manager on Mac OSX10.10 (64 bit) with Java version 1.7.0_65 and Ubuntu 14.04 (64 bit) with Java version 1.8_0.25
Any idea (why or) how to figure why the emulator is not responding anymore?
Any help would be appreciated.
Please post in Android Software and Hacking General [Developers Only] and one of the experts will be happy to help.
Sorry, but since I am a new user, I am not allowed to post there.

Categories

Resources