Android 4.4 : Activate Debugging from Android Studio on a GPS device - Android Q&A, Help & Troubleshooting

Hello,
I am hacking a GPS device on Android 4.4. I install my apk in priv-app, consequently I have full access to the device.
My problem is that I can't debug the device from Android Studio, every time I want to test my app, I flash the firmware.
I am trying to access the device directly from AndroidStudio, I activate 3 settings :
Settings.Secure.putInt(caniGPSApplication.getapplicationContext().getContentResolver(), Settings.Global.ADB_ENABLED, 1);
Settings.Secure.putInt(caniGPSApplication.getapplicationContext().getContentResolver(), Settings.Global.DEVELOPMENT_SETTINGS_ENABLED, 1);
Settings.Secure.putInt(caniGPSApplication.getapplicationContext().getContentResolver(), Settings.Global.INSTALL_NON_MARKET_APPS, 1);
Click to expand...
Click to collapse
The first settings "ADB_ENABLED" allowed me to see the device in AndroidStudio but I can't install the app from AndroidStudio or attach the process (no process is found). When I try to execute/install the apk I have this error :
12/11 18:32:23: Launching 'app' on sgtc G4E.
Installation did not succeed.
The application could not be installed.
List of apks:
[0] 'MYAPK.apk'
Installation failed due to: 'Unknown failure: pkg: /data/local/tmp/MYAPK.apk
Killed'
Click to expand...
Click to collapse
Have you some ideas ? Maybe there is an other setting I have to activate ?
I am thinking about something like "Install via USB" option but I did not found how to set it.
Thank you

Related

Unable to Install Droid Explorer, need help!

I already installed "Android SDK" on my windows7 (32 bit) computer. Today i try to install "DroidExplorer.0.8.8.3.x86".
When i try to install it, its installation process request browse correct "SDK Folder". Then i select "Setup android SDK for me". After that i display following error message.
Please help me to install this tool on my PC.
Thanks!
Error message that i receive!
System.UnauthorizedAccessException: Access to the path 'adb.exe' is denied.
at System.IO.Directory.DeleteHelper(String fullPath, String userPath, Boolean recursive)
at System.IO.Directory.Delete(String fullPath, String userPath, Boolean recursive)
at DroidExplorer.Bootstrapper.Panels.DownloadPanel.SdkPathCleanup() in d:\Development\projects\csharp\droidexplorer\trunk\DroidExplorer\DroidExplorer.Bootstrapper\Panels\DownloadPanel.cs:line 251
at DroidExplorer.Bootstrapper.Panels.DownloadPanel.RunSetup() in d:\Development\projects\csharp\droidexplorer\trunk\DroidExplorer\DroidExplorer.Bootstrapper\Panels\DownloadPanel.cs:line 181
Click to expand...
Click to collapse
Thanks!
After i end, "adb.exe" process using windows task manager, installation process work, and it automatically detect "SDK Folder", but now i receive following error.
System.InvalidOperationException: Cannot start service DroidExplorerService on computer '.'. ---> System.ComponentModel.Win32Exception: The service did not respond to the start or control request in a timely fashion
--- End of inner exception stack trace ---
at System.ServiceProcess.ServiceController.Start(String[] args)
at System.ServiceProcess.ServiceController.Start()
at DroidExplorer.Bootstrapper.Panels.StartServicePanel.StartService() in d:\Development\projects\csharp\droidexplorer\trunk\DroidExplorer\DroidExplorer.Bootstrapper\Panels\StartServicePanel.cs:line 53
Click to expand...
Click to collapse
hhhhh same cases... anyone help us please... -_-"
i have ADB already installed & also have android SDK, but after installing DroidExplorer.0.8.8.3.x86 , when its asks for sdk path ,after i browse & locate, it shows me "droid explorer android sdk invalid" error ... any other way to install it ???
No, this program is pretty much worthless and hasn't been supported for years.

[Q][XU][JB] Unable to dev - Permission denied

Hello guys, I have a little problem with developing apps in my phone.
I installed Stock Android 4.1.2 v4 for my Xperia U ST25i ( http://forum.xda-developers.com/showthread.php?t=2284394 ) (I wanted to post this issue in this thread but i'm new here and I just can't... anyways, rules are rules), and i'm have some issues when I want test APK's in my phone via ADB or Eclipse-ADT.
When I click excecute ( or do adb install), the process will fail, showing me that:
Code:
[2013-07-23 16:40:48 - AWifiSignal] ------------------------------
[2013-07-23 16:40:48 - AWifiSignal] Android Launch!
[2013-07-23 16:40:48 - AWifiSignal] adb is running normally.
[2013-07-23 16:40:48 - AWifiSignal] Performing net.elsemieni.awifisignal.SplashActivity activity launch
[2013-07-23 16:40:48 - AWifiSignal] Automatic Target Mode: Unable to detect device compatibility. Please select a target device.
[2013-07-23 16:40:51 - AWifiSignal] WARNING: Unknown device API version!
[2013-07-23 16:40:51 - AWifiSignal] Uploading AWifiSignal.apk onto device 'YT9002B59S'
[2013-07-23 16:40:52 - AWifiSignal] Installing AWifiSignal.apk...
[2013-07-23 16:40:53 - AWifiSignal] Installation failed due to invalid APK file!
[2013-07-23 16:40:53 - AWifiSignal] Please check logcat output for more details.
[2013-07-23 16:40:53 - AWifiSignal] Launch canceled!
In simple words, doesn't install beacuse [INSTALL_FAILED_INVALID_APK] error code.
Of course, i have Debugging activated in my phone and install 3rd party applications.
By the way, Logcat gives me that
Code:
07-21 18:05:23.663: W/zipro(25492): Unable to open zip '/data/local/tmp/AWifiSignal.apk': Permission denied
07-21 18:05:23.673: W/PackageParser(25492): Unable to read AndroidManifest.xml of /data/local/tmp/AWifiSignal.apk
That's curious I can't write inside it. I searched the forums and I applied a workaroud solution (http://forum.xda-developers.com/showthread.php?p=40040546&postcount=4), to make a link from tmp to sdcard folder. It worked in this way, but ruined the phone sys after reboot ( crashes randomly, most critical app's frezzes, etc), so doesn't work.
I know that's a firmware bug, but... any ideas about this? There's another workaround to make tmp safely writable, or any way to change the folder who ADB uses to install apps remotely?
Thanks! :laugh:

Tecmobile You 25 root

Hello,
After a long time looking ways to root the You 25, I've found the right way to do it.
The You 25 is very similar to Micromax A51, as some users suggested. It is based on broadcom cpu.
Quick characteristics: gb 2,3,7, 256Mb ram, 256Mb rom, 2Gb Sdcard, dual sims, 3g ....
On Win7: Disable antivirus
1) Download unlockroot23
2) Execute unlockroot23
3) Two items:
- execute install driver
- You 25ower off; take off batteryand back ; connect You 25 usb cable to the pc; wait driverdetection (popup tells adb installed or something similar); poweron you25; set it in debug mode and unknown source checked (in settings applications menu) ...
4) Execute unlookroot.exe
2 panes popup opens:
- Click on ROOT (in green) item on the left pane,
- Click on the detected You25 item on the right pane;
Normally rooting is executed (the root button greys on);
Once finished, the You25 reboots (I d'ont remember exactly ...)
After reboot, check for SuperSu icon is there.
Check su with terminal, should ask su access to SuperSu.
Thanks to forii, which I haven't bookmarked. Just in case: Browse with search " Micromax a51 root".
.
Tecmobile you25: Fixing vulnerabilities (trying)
Hello,
After the rooting, I try to fixmaster key vulnerabilities.
With the forii help ,many thanks to them, I come up with a solution:
- Install bluebox from Google play;
- Install Xposed framework for Gingerbread 2.3 (Xposedinstaller-2.2-2013005.apk (1.25Mb)) from androidforums.com);
- Install Master key fix (support Gingerbread) me.piebridge.masterkeyfixgb_v2-0d0824.apk from Xposed module repository repo.xposed.info
Once setup Xposed and install the module, running bluebox shows all fixed.

Python Script for Copy and Reinstall all Third Party apps from Device

i have created python script for copy all third party apps installed in your device and copy all the apps in your pc.
NON-ROOT script.
script uses adb shell commands for copy and reinstall apps in your device so no need of root access.
for now i only manage to test it on X00TD(Android 9.0) for now. Update me for other device/android versions.
Steps for backup apps :-
1) Download python 3 from python.org and install it in your pc.
2) Download python script files from the link below.
3) Run "windows-backup.py" if you are on Windows OS, else "linux-backup.py" for linux based OS.
Steps for reinstall apps:-
*first 2 steps are same
3) Run "install-apps.py" for install apps OS dosent effect on this script.
YouTube :- www . youtube . com / watch?v=EEoPo7Hqt3k
File Download link :- bit.ly / 2Lhqe0T (remove spaces).

			
				
I'm getting error.
Zenfone max pro m1
Android: 8.1 (stock, No root, bootloader unlocked, TWRP recovery)
PC: Windows 8.1
USB debugging enabled, USB mounted as storage
ERROR msg in screenshot
foxonfox said:
I'm getting error.
Zenfone max pro m1
Android: 8.1 (stock, No root, bootloader unlocked, TWRP recovery)
PC: Windows 8.1
USB debugging enabled, USB mounted as storage
ERROR msg in screenshot
Click to expand...
Click to collapse
Install adb in your pc first
Can you tell me why I'm getting this error?
[email protected]:~/Documents/App backup-restore$ python3 linux-backup.py
Folder Created
Fetching Packages list from device
error: no devices/emulators found
Packages are fethced
Copying Started
Total 1 Apps
b'
1 : .apk
/bin/sh: 1: Syntax error: Unterminated quoted string
Traceback (most recent call last):
File "linux-backup.py", line 47, in <module>
os.rename("base.apk",name)
FileNotFoundError: [Errno 2] No such file or directory: 'base.apk' -> '.apk'
[email protected]:~/Documents/App backup-restore$
What's wrong or what am i doing wrong?
OS 9 MSM Extended with MicroG installed (No Google)
EDIT:
got it after enabling USB DeBugging

How To Guide Force 120Hz MIUI 13 & MIUI 14

This is a thread for those who don't want to root their device to force 120Hz on every app.​If you are looking for a root solution, then use the LSPosed module called MIUI Performance Saver - Download here
In this way, you can force 120Hz in applications such as: YouTube, MX Player, Google Maps and many others that run at 60Hz by default in MIUI.
You will notice the changes, but you can check it by turning on the refresh rate counter in developer options and check the changes before and after.
​First method via ADB
1. In your device, in developer options, enable usb debugging and usb debugging (security settings) and connect your phone to the PC.
2. Download platform tools and extract to a folder
3. Open console in the platform tools folder
4. Enter the following command:
For MIUI 13:
Code:
adb shell settings put system user_refresh_rate 1
For MIUI 14:
Code:
adb shell settings put secure user_refresh_rate 1
If first method doesn't work for you, then try second method.
Second method via Settings Database Editor app
Download this app from the Play Store and for it to work properly, download and install this file from github (settings-database-provider.apk).
For MIUI 13:
1. Open Settings Database Editor app
2. Search "user_refresh_rate"
3. Cick on it to edit the value and replace 120 with 1 and save changes
4. Done
For MIUI 14:
MIUI 14 requires you to grant permissions to the Settings Database Provider app via ADB
1. In your device, in developer options, enable usb debugging and usb debugging (security settings) and connect your phone to the PC.
2. Download platform tools and extract to a folder
3. Open console in platform tools folder
4. Enter the following command:
Code:
adb shell pm grant com.netvor.settings.database.provider android.permission.WRITE_SECURE_SETTINGS
5. Open Settings Database Editor app
6. Search "user_refresh_rate"
7. Cick on it to edit the value and replace 120 with 1 and save changes
8. Done
Keep in mind that it may not work because Xiaomi changes something under the hood of the updates.
I dont know what to say, force fps can cause useless battery drain on app that dont really need ... Do you really need 120hz when you send sms or making call or even messenger ... All do what they want but i wont use it
snx413 said:
I dont know what to say, force fps can cause useless battery drain on app that dont really need ... Do you really need 120hz when you send sms or making call or even messenger ... All do what they want but i wont use it
Click to expand...
Click to collapse
I've been using this method since I had the Poco F3 and I've never noticed that the battery was draining much because of it. I'm used to 120Hz and find it irritating to suddenly switch to 60Hz when scrolling in YouTube or some other app. I am not forcing anyone to force 120Hz on their devices.
Yeah but its most of the time at 120 btw, only you tube and tik tok seems to lower it at 60,
I miss my poco f3... They have all custom rom they want pfff, i sold to my brother ...
root and non root method doesnt work for my poco f3 with xiaomi.eu, i tried global too
HappyTrix said:
root and non root method doesnt work for my poco f3 with xiaomi.eu, i tried global too
Click to expand...
Click to collapse
Can you provide more information? Any errors when executing commands in ADB? Can't find user_refresh_rate in setedit app? It's impossible that it wouldn't work on Poco F3, because I had this device until recently (now I don't have it anymore) and both methods worked perfectly in global ROMs and xiaomi.eu.
is there any way to force it from 120hz to 60hz instantly when i stop swiping? it only works when brightness is above 50%, if below 50% it's always 120hz
nhquocnam said:
is there any way to force it from 120hz to 60hz instantly when i stop swiping? it only works when brightness is above 50%, if below 50% it's always 120hz
Click to expand...
Click to collapse
This is MIUI, nothing can be done about it. You can try Magisk root + LSPosed "MIUI Performance Saver" module and force 120hz, which "maybe" will solve your problem, or you can wait for some custom rom that will hopefully come out for the Xiaomi 12T Pro someday, as long as Xiaomi releases kernel source code for this device.
I cant seem to get my ADB to work u have any guides? and there is no "console" in the platform tools folder please help me
uvzen said:
This is a thread for those who don't want to root their device to force 120Hz on every app.​If you are looking for a root solution, then use the LSPosed module called MIUI Performance Saver - Download here
In this way, you can force 120Hz in applications such as: YouTube, MX Player, Google Maps and many others that run at 60Hz by default in MIUI.
You will notice the changes, but you can check it by turning on the refresh rate counter in developer options and check the changes before and after.
​First method via ADB
1. In your device, in developer options, enable usb debugging and usb debugging (security settings) and connect your phone to the PC.
2. Download platform tools and extract to a folder
3. Open console in the platform tools folder
4. Enter the following command:
For MIUI 13:
Code:
adb shell settings put system user_refresh_rate 1
For MIUI 14:
Code:
adb shell settings put secure user_refresh_rate 1
Second method via SetEdit app
Download this app from Play Store
For MIUI 13:
1. Open Setedit app and scroll down to the end
2. Find "user_refresh_rate" "120"
3. Cick on it to edit the value and replace 120 with 1 and save changes
4. Done
For MIUI 14:
MIUI 14 requires you to grant permissions to the Setedit app via ADB
1. In your device, in developer options, enable usb debugging and usb debugging (security settings) and connect your phone to the PC.
2. Download platform tools and extract to a folder
3. Open console in the platform tools folder
4. Enter the following command:
Code:
adb shell pm grant by4a.setedit22 android.permission.WRITE_SECURE_SETTINGS
5. Open Setedit app
6. In the right corner, change the "System Table" tab to "Secure Table"
7. Scroll down to the end and find "user_refresh_rate" "120"
8. Cick on it to edit the value and replace 120 with 1 and save changes
9. Done
Click to expand...
Click to collapse
Thank you, useful af
I'm getting an error while running the adb command :
Exception occurred while executing 'put':
java.lang.SecurityException: Permission denial: writing to settings requires:android.permission.WRITE_SECURE_SETTINGS
at com.android.providers.settings.SettingsProvider.enforceWritePermission(SettingsProvider.java:2331)
at com.android.providers.settings.SettingsProvider.mutateSecureSetting(SettingsProvider.java:1768)
at com.android.providers.settings.SettingsProvider.insertSecureSetting(SettingsProvider.java:1719)
at com.android.providers.settings.SettingsProvider.call(SettingsProvider.java:467)
at android.content.ContentProvider.call(ContentProvider.java:2533)
at android.content.ContentProvider$Transport.call(ContentProvider.java:530)
at com.android.providers.settings.SettingsService$MyShellCommand.putForUser(SettingsService.java:382)
at com.android.providers.settings.SettingsService$MyShellCommand.onCommand(SettingsService.java:278)
at com.android.modules.utils.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:97)
at android.os.ShellCommand.exec(ShellCommand.java:38)
at com.android.providers.settings.SettingsService.onShellCommand(SettingsService.java:50)
at android.os.Binder.shellCommand(Binder.java:1054)
at android.os.Binder.onTransact(Binder.java:882)
at android.os.Binder.execTransactInternal(Binder.java:1290)
at android.os.Binder.execTransact(Binder.java:1249)
SooRaj SuResh said:
I'm getting an error while running the adb command :
Exception occurred while executing 'put':
java.lang.SecurityException: Permission denial: writing to settings requires:android.permission.WRITE_SECURE_SETTINGS
at com.android.providers.settings.SettingsProvider.enforceWritePermission(SettingsProvider.java:2331)
at com.android.providers.settings.SettingsProvider.mutateSecureSetting(SettingsProvider.java:1768)
at com.android.providers.settings.SettingsProvider.insertSecureSetting(SettingsProvider.java:1719)
at com.android.providers.settings.SettingsProvider.call(SettingsProvider.java:467)
at android.content.ContentProvider.call(ContentProvider.java:2533)
at android.content.ContentProvider$Transport.call(ContentProvider.java:530)
at com.android.providers.settings.SettingsService$MyShellCommand.putForUser(SettingsService.java:382)
at com.android.providers.settings.SettingsService$MyShellCommand.onCommand(SettingsService.java:278)
at com.android.modules.utils.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:97)
at android.os.ShellCommand.exec(ShellCommand.java:38)
at com.android.providers.settings.SettingsService.onShellCommand(SettingsService.java:50)
at android.os.Binder.shellCommand(Binder.java:1054)
at android.os.Binder.onTransact(Binder.java:882)
at android.os.Binder.execTransactInternal(Binder.java:1290)
at android.os.Binder.execTransact(Binder.java:1249)
Click to expand...
Click to collapse
Changing refresh rate via ADB doesn't work for me either. Xiaomi changed something in the permissions again during one of the updates. I just updated my thread, so try second method through the Settings Database Editor app, because I checked and it works for me on Xiaomi.eu weekly 23.5.22.
Very good find! I had it working on MIUI 13 but I had been waiting to get it working on MIUI 14 since forever, didn't know we had to modify the secure table for this. Also, do you know any more efficient ways to do this with root? I am always rooted.
SooRaj SuResh said:
I'm getting an error while running the adb command :
Spoiler: Code
Exception occurred while executing 'put':
java.lang.SecurityException: Permission denial: writing to settings requires:android.permission.WRITE_SECURE_SETTINGS
at com.android.providers.settings.SettingsProvider.enforceWritePermission(SettingsProvider.java:2331)
at com.android.providers.settings.SettingsProvider.mutateSecureSetting(SettingsProvider.java:1768)
at com.android.providers.settings.SettingsProvider.insertSecureSetting(SettingsProvider.java:1719)
at com.android.providers.settings.SettingsProvider.call(SettingsProvider.java:467)
at android.content.ContentProvider.call(ContentProvider.java:2533)
at android.content.ContentProvider$Transport.call(ContentProvider.java:530)
at com.android.providers.settings.SettingsService$MyShellCommand.putForUser(SettingsService.java:382)
at com.android.providers.settings.SettingsService$MyShellCommand.onCommand(SettingsService.java:278)
at com.android.modules.utils.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:97)
at android.os.ShellCommand.exec(ShellCommand.java:38)
at com.android.providers.settings.SettingsService.onShellCommand(SettingsService.java:50)
at android.os.Binder.shellCommand(Binder.java:1054)
at android.os.Binder.onTransact(Binder.java:882)
at android.os.Binder.execTransactInternal(Binder.java:1290)
at android.os.Binder.execTransact(Binder.java:1249)
Click to expand...
Click to collapse
Try with granting permission to the app. Even with that you will get an error which you can solve as follows:
How can I use adb to grant permission without root?
Background I'm trying to create an app that can grant and revoke permissions of other apps. To do this I'm using adb commands: pm grant packageName permissionName This works great if I call it
stackoverflow.com
Unknown.Guy said:
Also, do you know any more efficient ways to do this with root? I am always rooted.
Click to expand...
Click to collapse
If you have root then use LSPosed module MIUI Performance Saver.

Categories

Resources