Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

Tutorial/tool to modify a kernel to hide non-debuggable apps ?

OP AndroidDeveloperLB

1st July 2014, 01:21 AM   |  #1  
OP Senior Member
Thanks Meter: 167
 
527 posts
Join Date:Joined: Mar 2014
Ever since I've moved to AOSP based roms (SlimKat, CyanogenMod, OmniRom, Resurrection-Remix,...) , I've noticed that in the DDMS tool (a tool for developers) that it shows all processes, and not just debuggable processes, including all third party apps' processes and OS's processes.

This never occurred for me on stock roms, no matter which device or stock rom I've looked at.

This issue annoys me as a developer, since I usually run only a single app that I develop and when I go to DDMS to choose the app's process, I need to find it amongst many processes (even of WhatsApp) , and, provided it hasn't changed its position on the list, click it and debug it.

So I asked about this on some kernels forums, and usually people didn't mind about it (and for good reason - it can bother only few people).

I've found the next tweak which can do it, but since I'm a complete newb in creating/modifying kernels, I have no idea how to patch it:

Quote:

setprop ro.debuggable=0

Found from here .

I've contacted a few kernel developers and one of them agreed to check it out. I've tested it on CM and it worked just as it was intended :
Only debuggable apps' processes were visible and ready to be debugged.

Anyway, I wish to ask whoever is an expert in developing/modifying kernels those questions:

1. Why isn't this tweak enabled by default?
I mean, this is not the normal way roms work. It's not like this on any stock rom I've seen, not even on Nexus stock roms...
I also don't get why it's this way even for "final/stable" version roms (meaning not nightlies or experimental ones), since you'd probably not need to be able to debug them (users won't give you their device just for that...) .

2. Can you please explain to me, step by step (but don't assume I know anything about kernels development), how to take a rom's zip, and change its kernel so that this tweak will be enabled?
Maybe I could make an automatic tool that does it, either in Java for desktop or for Android.

3. Is there any way to enable this tweak without modifying the kernel? Maybe by using a tool that works with it?
Or maybe, provided we got root, change something to enable it?
Last edited by AndroidDeveloperLB; 1st July 2014 at 07:29 AM.
Post Reply Subscribe to Thread

Tags
ddms, debug, kernel
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes