adb

adb has stopped working in android studio

依然范特西╮ 提交于 2021-01-21 08:31:25
问题 I am trying to build my first app in android studio and getting an error "adb.exe has stopped working". I am working on Windows xp 32 bit system. Have tried several solutions available online including -kill server/restart -updating platform tools folder -adding 127.0.0.1 as exception to be allowed Still nothing seems to work out. Kindly help!!! Thanks in advance 回答1: I think you miss a .dll file, this file api-ms-win-crt-locale-l1-1-0.dll from your Windows 32-Bit system, just download that

adb has stopped working in android studio

三世轮回 提交于 2021-01-21 08:31:11
问题 I am trying to build my first app in android studio and getting an error "adb.exe has stopped working". I am working on Windows xp 32 bit system. Have tried several solutions available online including -kill server/restart -updating platform tools folder -adding 127.0.0.1 as exception to be allowed Still nothing seems to work out. Kindly help!!! Thanks in advance 回答1: I think you miss a .dll file, this file api-ms-win-crt-locale-l1-1-0.dll from your Windows 32-Bit system, just download that

adb has stopped working in android studio

时光毁灭记忆、已成空白 提交于 2021-01-21 08:28:12
问题 I am trying to build my first app in android studio and getting an error "adb.exe has stopped working". I am working on Windows xp 32 bit system. Have tried several solutions available online including -kill server/restart -updating platform tools folder -adding 127.0.0.1 as exception to be allowed Still nothing seems to work out. Kindly help!!! Thanks in advance 回答1: I think you miss a .dll file, this file api-ms-win-crt-locale-l1-1-0.dll from your Windows 32-Bit system, just download that

Prevent screen sleeping

末鹿安然 提交于 2021-01-21 08:10:15
问题 Android v4.2.2. I'm trying to stop the screen from going to sleep. I've tried a few things like changing the relevant settings in the db: adb shell "sqlite3 /data/data/com.android.providers.settings/databases/settings.db \"update system set value='-1' where name='screen_off_timeout'\";" But that didn't work - screen just went to sleep almost immediately. If I go to the settings app there isn't an option to disable it. Instead, it ranges from 15s to 30m. I have also tried to set the KEEP

Prevent screen sleeping

浪子不回头ぞ 提交于 2021-01-21 08:10:02
问题 Android v4.2.2. I'm trying to stop the screen from going to sleep. I've tried a few things like changing the relevant settings in the db: adb shell "sqlite3 /data/data/com.android.providers.settings/databases/settings.db \"update system set value='-1' where name='screen_off_timeout'\";" But that didn't work - screen just went to sleep almost immediately. If I go to the settings app there isn't an option to disable it. Instead, it ranges from 15s to 30m. I have also tried to set the KEEP

Install APK in Work Profile via ADB in Android

瘦欲@ 提交于 2021-01-21 07:21:49
问题 Let's say we have a Work Profile (Android For Work) enabled in Android device. Does anyone know how to install an APK via ADB in Work Profile rather than personal profile. I have seen the ADB documentation and there's a way to get the User ID but using the same ID I am unable to install an APK. To get ID : adb shell pm list users Install command : adb install -r --user 12 app_name.apk Error message : Performing Streamed Install adb: failed to install app-prodDebug.apk: Security exception:

How to disable battery charging during ADB connection?

我们两清 提交于 2020-12-28 02:51:50
问题 Problem description: Each time wen I connect USB cable between PC and my mobile phone the battery automatically is charged. I want to use ADB protocol but I don't want to charge my battery during ADB connection. Is it possible to to turn off this charging? And ofcourse how can I do this? Environment: Mobile phone with Android os 4 and higher I need only mention that my referential device working on android 5 so there is no /sys/class/power_supply/battery/force_usb_charging file 回答1: BEWARE:

Where to lookup for the meaning “adb screencap” command's exit codes or how to get the meaning programatically?

こ雲淡風輕ζ 提交于 2020-12-15 06:17:26
问题 Process p = Runtime.getRuntime().exec("screencap -p /storage/sdcard0/test3332.png"); p.waitFor(); String error = "error: " + p.exitValue(); p.exitValue() is equal to 11 How to get the "meaning" or message from this exit code? If this should be available in the command's manual, then where to find this manual? Can someone post a link or a reference ? 回答1: The error message can be retrieved in this way: int ch; StringBuilder sb = new StringBuilder(); while((ch = p.getErrorStream().read()) != -1

Android: Root -> Give app permission -> Unroot? Does an app loose permission granted by su after unrooting the phone?

↘锁芯ラ 提交于 2020-12-15 04:34:35
问题 App.apk programatcially runs the command: Runtime.getRuntime().exec("screenrecord", "--time-limit 5", "/sdcard/demo1.mp4") To do so, It requires permission, which also requires rooting the phone to give this app permissions. The problem is rooting puts the phone at both malfunctioning and security risks. Note: This app is not to be published, but used by one normal user. The question: Is It possible to: 1- Root the phone, then 2- Give the app this permission, then 3- Unroot the phone In other

Android: Root -> Give app permission -> Unroot? Does an app loose permission granted by su after unrooting the phone?

我只是一个虾纸丫 提交于 2020-12-15 04:34:04
问题 App.apk programatcially runs the command: Runtime.getRuntime().exec("screenrecord", "--time-limit 5", "/sdcard/demo1.mp4") To do so, It requires permission, which also requires rooting the phone to give this app permissions. The problem is rooting puts the phone at both malfunctioning and security risks. Note: This app is not to be published, but used by one normal user. The question: Is It possible to: 1- Root the phone, then 2- Give the app this permission, then 3- Unroot the phone In other