run-as Package 'a.b.c' is unknown - Galaxy S4 Jellybean or Android 4.3
Found success by adding this to the activity:
private void startGdbServer() {
try {
new ProcessBuilder()
.command(getFilesDir().getParent() + "/lib/gdbserver", "tcp:5039", "--attach" ,"" + android.os.Process.myPid())
.redirectErrorStream(true)
.start();
} catch (IOException e) {
Log.e(TAG, "IOException failed to start gdbserver");
}
}
Then I wrapped startGdbServer in an Android service and updating the ndk-gdb script to start the server instead of the run-as command.
Here's the manifest addition:
<service android:enabled="true" android:name="com.apportable.activity.GdbServerService"
android:label="@string/app_name" android:icon="@drawable/icon">
<intent-filter >
<action android:name="apportable.FoundationTests.GdbServerService" />
</intent-filter>
</service>
Here are the relevant ndk-gdb changes (in python):
remote_gdbserver = '/data/data/' + env['APPLICATION_IDENTIFIER'] + '/lib/gdbserver'
print "Attaching to pid " + pid
# Android 4.2 requires the --user 0 option. Earlier versions cannot have it
results = env.Execute([env['ADB'], 'shell', 'am'])
if "--user" in results:
user_option = "--user 0"
else:
user_option = ""
adb.AsyncShell(env, 'am startservice ' + user_option + ' -a ' + env['APPLICATION_IDENTIFIER'] + '.GdbServerService --es gdbserver_name ' + remote_gdbserver + ' --ei gdbserver_port ' + str(env['ANDROID_REMOTE_DEBUG_PORT']))
# HACK: magic number. ensure the gdb server is actually up and running
time.sleep(2) # 1 is usually enough, but not always, like after reboot or with heavy system load
adb.Forward(env, env['ANDROID_LOCAL_DEBUG_PORT'], env['ANDROID_REMOTE_DEBUG_PORT'])
adb.Pull(env, process_path, '/system/bin/app_process')
setup_path = '"' + setup_path + '"'
if env['CGDB'] is not None:
cmd = [env['CGDB'], '-d', env['GDB'], '--', '-x', setup_path]
else:
cmd = [env['GDB'], '-x', setup_path]
env.RunCommand(cmd)
Sencha Touch/Cordova app devastated after Android Level 18 Jellybean 4.3 Update in HTC One
The following patch resolves the issue!
http://www.sencha.com/forum/showthread.php?273492-Back-button-broke-in-navigationview-Sencha-Touch-2.3-Android-4.3&p=1009111&viewfull=1#post1009111
Looking forward to seeing this implemented in the next Sencha Touch update.
Adb copy from device
Its a recognized Android bug.
More info here and here
The issue is related to the use of "run-as", not "pull", is it totally needed for what you want to achieve?
Hope this help.s
Related Topics
How to Programmatically Trigger the Touch Event in Android
Android - Inner Element Must Either Be a Resource Reference or Empty
How to Include Data Files with the App's APK
Preferencefragmentcompat Has Padding on Preferencecategory That I Can't Get Rid Of
Android Webview Onreceivederror()
Overridependingtransition Does Not Work When Flag_Activity_Reorder_To_Front Is Used
How Does Doze Mode Affect Background/Foreground Services, With/Without Partial/Full Wakelocks
How to Block Virtual Keyboard While Clicking on Edittext in Android
How to Set My Sms App Default in Android Kitkat
Unregistered_On_Api_Console While Getting Oauth2 Token on Android
Highlight Custom Listview Item When Long Click
How to Combine Multiple Images into a Single Image in Android
Using Tesseract for Handwriting Recognition
Scrolling with Multiple Listviews for Android
How to Change the Font Size in a Whole Application Programmatically, Android