Tools:
https://github.com/patrickfav/uber-apk-signer
https://github.com/iBotPeaches/Apktool
How:
apktool d app-release.apk -o extracted_apk| #!/usr/bin/env kotlin -language-version 1.9 | |
| // Make sure you run "brew install kotlin graphviz" first. | |
| @file:Repository("https://repo.maven.apache.org/maven2/") | |
| @file:Repository("https://dl.google.com/dl/android/maven2/") | |
| @file:DependsOn("com.squareup.leakcanary:shark-android:3.0-alpha-8") | |
| @file:DependsOn("androidx.collection:collection-jvm:1.4.0") | |
| import androidx.collection.IntList |
| class MainActivity : ComponentActivity() { | |
| override fun onCreate(savedInstanceState: Bundle?) { | |
| WindowCompat.setDecorFitsSystemWindows(window, false) | |
| super.onCreate(savedInstanceState) | |
| setContent { | |
| P2RTheme { | |
| // A surface container using the 'background' color from the theme | |
| Surface(modifier = Modifier.fillMaxSize(), color = MaterialTheme.colorScheme.background) { | |
| CompositionLocalProvider( | |
| LocalOverscrollConfiguration provides null // Disable overscroll otherwise it consumes the drag before we get the chance |
| # To measure lauch time | |
| fun launchTime(){ | |
| # Config | |
| LAUNCH_COUNT=10 | |
| REGEX='TotalTime: (\d+)' | |
| # The two params are configurable via argument | |
| DEFAULT_PACKAGE_NAME='com.your.packagename' |
| @Composable | |
| fun CustomWebView(modifier: Modifier = Modifier, | |
| url:String, | |
| onBack: (webView:WebView?) -> Unit, | |
| onProgressChange: (progress:Int)->Unit = {}, | |
| initSettings: (webSettings:WebSettings?) -> Unit = {}, | |
| onReceivedError: (error: WebResourceError?) -> Unit = {}){ | |
| val webViewChromeClient = object:WebChromeClient(){ | |
| override fun onProgressChanged(view: WebView?, newProgress: Int) { | |
| //回调网页内容加载进度 |
| @Composable | |
| fun FlowRow( | |
| horizontalGap: Dp = 0.dp, | |
| verticalGap: Dp = 0.dp, | |
| alignment: Alignment.Horizontal = Alignment.Start, | |
| content: @Composable () -> Unit, | |
| ) = Layout(content = content) { measurables, constraints -> | |
| val horizontalGapPx = horizontalGap.toPx().roundToInt() | |
| val verticalGapPx = verticalGap.toPx().roundToInt() |
| ffmpeg -ss $INPUT_START_TIME -t $LENGTH -i $INPUT_FILENAME \ | |
| -vf "fps=$OUTPUT_FPS,scale=$OUTPUT_WIDTH:-1:flags=lanczos,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" \ | |
| -loop $NUMBER_OF_LOOPS $OUTPUT_FILENAME | |
| # Change these placeholders: | |
| # * $INPUT_START_TIME - number of seconds in the input video to start from. | |
| # * $LENGTH - number of seconds to convert from the input video. | |
| # * $INPUT_FILENAME - path to the input video. | |
| # * $OUTPUT_FPS - ouput frames per second. Start with `10`. | |
| # * $OUTPUT_WIDTH - output width in pixels. Aspect ratio is maintained. |
Tools:
https://github.com/patrickfav/uber-apk-signer
https://github.com/iBotPeaches/Apktool
How:
apktool d app-release.apk -o extracted_apkAll packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker. This will install the whole docker suite, left only Tini to be compiled manually.
| import androidx.lifecycle.get | |
| import androidx.lifecycle.ViewModel | |
| import androidx.lifecycle.ViewModelProvider | |
| import androidx.lifecycle.ViewModelStore | |
| import androidx.lifecycle.ViewModelStoreOwner | |
| /** | |
| * Returns a property delegate to access the wrapped value, which will be retained for the | |
| * duration of the lifecycle of this [ViewModelStoreOwner]. | |
| * |
| #!/bin/bash | |
| # Make sure your Android device is plugged in and accessible over adb. | |
| #### Remember to enable virtual displays in xorg by adding the following to your configuration (e.g. /usr/share/X11/xorg.conf.d/20-virtual.conf) | |
| # Section "Device" | |
| # Identifier "intelgpu0" | |
| # Driver "intel" | |
| # Option "VirtualHeads" "1" | |
| #EndSection |