mirror of
https://gitlab.com/octtspacc/browserocto
synced 2025-06-05 21:49:19 +02:00
Some progress on hacking the webview
This commit is contained in:
25
tools/tiny-android-template/run.sh
Executable file
25
tools/tiny-android-template/run.sh
Executable file
@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
|
||||
source includes.sh
|
||||
|
||||
MF=`cat AndroidManifest.xml`
|
||||
TERM="package=[\'\"]([a-z0-9.]+)"
|
||||
|
||||
if [[ "$MF" =~ $TERM ]]
|
||||
then
|
||||
package="${BASH_REMATCH[1]}"
|
||||
activity=".MainActivity"
|
||||
|
||||
TERM="<activity([^>]+)"
|
||||
if [[ "$MF" =~ $TERM ]]; then
|
||||
tag="${BASH_REMATCH[1]}"
|
||||
TERM="[\'\"]([^\'\"]+)"
|
||||
[[ "$tag" =~ $TERM ]] && activity="${BASH_REMATCH[1]}"
|
||||
fi
|
||||
|
||||
$CMD_ADB install -r -t app.apk && \
|
||||
$CMD_ADB shell am start -n $package/$activity
|
||||
else
|
||||
echo Could not find a suitable package name inside AndroidManifest.xml
|
||||
exit
|
||||
fi
|
Reference in New Issue
Block a user