Skip to content

Instantly share code, notes, and snippets.

View sjchmiela's full-sized avatar
🕊️
Have a great day!

Stanisław Chmiela sjchmiela

🕊️
Have a great day!
View GitHub Profile
@jameswomack
jameswomack / gist:5602102
Created May 17, 2013 21:29
Four-char UInt32 type codes to NSString and back
NSString *ABTypeCodeToString(UInt32 typeCode)
{
char string[5] = {*(((char*)&typeCode)+3), *(((char*)&typeCode)+2), *(((char*)&typeCode)+1), *(((char*)&typeCode)+0),0};
NSString *codeWithDot = @(string);
return [codeWithDot stringByTrimmingCharactersInSet:NSCharacterSet.punctuationCharacterSet];
}
UInt32 ABStringToTypeCode(NSString *typeString)
{
@nstarke
nstarke / release-android-debuggable.md
Last active June 26, 2024 15:20
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