Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not make the app debuggable #3

Open
saatomic opened this issue Mar 7, 2018 · 4 comments
Open

Does not make the app debuggable #3

saatomic opened this issue Mar 7, 2018 · 4 comments

Comments

@saatomic
Copy link

saatomic commented Mar 7, 2018

The feature that should make apps debuggable does not work for me on Android 6.0.1. I've verified this with the Android Studio Debugger and the Inspeckage tool (Xposed Framework).

Edit: I've tested this with an alternative device (Android 7.1.2), where it appears to be working.

@AlexKoshulyan
Copy link

I have the same issue.

@newdive
Copy link

newdive commented Nov 10, 2018

this module is trying to modified the behavior of AppPicker
by changing the "com.android.settings.extra.DEBUGGABLE" parameter

A more viable solution is to alter the flags of ApplicationInfo to ApplicationInfo.FLAG_DEBUGGABLE
you can achieve this by modifying the results of getInstalledApplications in android.app.ApplicationPackageManager
below is the sample code


XposedHelpers.findAndHookMethod("android.app.ApplicationPackageManager"
    , loadPackageParam.classLoader
    , "getInstalledApplications", int.class
    , new XC_MethodReplacement(){
        @Override
        protected Object replaceHookedMethod(MethodHookParam param) throws Throwable {
            List appInfos = (List)XposedBridge.invokeOriginalMethod(param.method, param.thisObject, param.args);
            for (Object appInfo : appInfos) {
                Field flagsField = appInfo.getClass().getDeclaredField("flags");
                int appFlags = (int) flagsField.get(appInfo);
                appFlags |= ApplicationInfo.FLAG_DEBUGGABLE;
                flagsField.set(appInfo, appFlags);
            }
            return appInfos;
        }
    });

If you have any adb by your side , you can also achieve this with simple adb shell commands
There is a solution in the issue "rovo89/XposedBridge#138 (comment)"

@ttimasdf
Copy link
Owner

Thanks, I'll make a bug fix later. Hardly have time for maintainence 😅

@fabiolanza
Copy link

Hi, I did not understand how this app works. I installed it with the intention to use the command:
adb shell am dumpheap 1234 /data/local/tmp/appheap

but it does not work, adb still saying that app is not debuggable. Do I need to do anything in special?

Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants