Skip to content

Instantly share code, notes, and snippets.

fun nonInlined(block: () -> Unit) {
println("before")
block()
println("after")
}
inline fun inlined(block: () -> Unit) {
println("before")
block()
println("after")
@dkwasniak
dkwasniak / release-android-debuggable.md
Created August 8, 2019 12:04 — forked from nstarke/release-android-debuggable.md
How to make a Release Android App debuggable

How to make a Release Android App debuggable

Let's say you want to access the application shared preferences in /data/data/com.mypackage.
You could try to run adb shell and then run-as com.mypackage ( or adb shell run-as com.mypackge ls /data/data/com.mypackage/shared_prefs), but on a production release app downloaded from an app store you're most likely to see:

run-as: Package 'com.mypackage' is not debuggable
11-23 10:03:40.193 11560-18461/com.jobtapteam.employee E/AbstractService: network error:
11-23 10:03:40.193 11560-18461/com.jobtapteam.employee E/AbstractService: REQUEST BODY: null
11-23 10:03:40.193 11560-18461/com.jobtapteam.employee E/AbstractService: CODE: 500
11-23 10:03:40.193 11560-18461/com.jobtapteam.employee E/AbstractService: MESSAGE: Internal Server Error
11-23 10:03:40.193 11560-18461/com.jobtapteam.employee E/AbstractService: ON: https://jtt-api-staging.jobtap.com/api/v1/code/55D72A
11-23 10:03:40.193 11560-18461/com.jobtapteam.employee E/AbstractService: WITH: GET
11-23 10:03:40.193 11560-18461/com.jobtapteam.employee E/AbstractService: RESPONSE BODY: {"stack_trace":" at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)\r\n at Boomerang.Repository.Implementations.UserRepository.<IsUserExistInLiveCareerDatabase>d__24.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwait
@psa('social:complete')
def register_by_access_token(request, backend):
# This view expects an access_token GET parameter, if it's needed,
# request.backend and request.strategy will be loaded with the current
# backend and strategy.
token = request.GET.get('access_token')
user = backend.do_auth(request.GET.get('access_token'))
if user:
login(request, user)
return 'OK'