Skip to content

Instantly share code, notes, and snippets.

@VDenis
VDenis / exowrapper.kt
Created August 7, 2021 21:16
Android: play /raw resource with Exoplayer
val player = ExoPlayerFactory.newSimpleInstance(context, DefaultTrackSelector())
val rawDataSource = RawResourceDataSource(context)
// open the /raw resource file
rawDataSource.open(DataSpec(RawResourceDataSource.buildRawResourceUri(R.raw.brown)))
// create a media source with the raw DataSource
val mediaSource = ExtractorMediaSource.Factory(DataSource.Factory { rawDataSource })
.createMediaSource(rawDataSource.uri)
//download data.ab (encrypted) and DONOT GIVE ANY PASSWORD when prompted
adb backup -f ~/data.ab -noapk app.package.name
//decrypt and extract the data.ab [this worked most of the time except for few instances ]
//this will output all the contents of app into 'apps' directory
dd if=data.ab bs=1 skip=24 | python -c "import zlib,sys;sys.stdout.write(zlib.decompress(sys.stdin.read()))" | tar -xvf -
//SOURCE: http://blog.shvetsov.com/2013/02/access-android-app-data-without-root.html
@VDenis
VDenis / .gitignore
Created November 20, 2015 14:23 — forked from kmorcinek/.gitignore
Example .gitignore file I use for C# projects
# Download this file using PowerShell v3 under Windows with the following comand
# Invoke-WebRequest https://gist.githubusercontent.com/kmorcinek/2710267/raw/ -OutFile .gitignore
# User-specific files
*.suo
*.user
*.sln.docstates
# Build results