Include phh-remotectl system for remote takeover

This commit is contained in:
Pierre-Hugues Husson 2020-02-26 23:48:48 +01:00 committed by tboy1991
parent 08ba36bd96
commit 6399544000
4 changed files with 27 additions and 0 deletions

View File

@ -153,3 +153,10 @@ PRODUCT_PACKAGES += \
# Privapp-permissions whitelist for PhhTrebleApp # Privapp-permissions whitelist for PhhTrebleApp
PRODUCT_COPY_FILES += \ PRODUCT_COPY_FILES += \
device/phh/treble/privapp-permissions-me.phh.treble.app.xml:system/etc/permissions/privapp-permissions-me.phh.treble.app.xml device/phh/treble/privapp-permissions-me.phh.treble.app.xml:system/etc/permissions/privapp-permissions-me.phh.treble.app.xml
# Remote debugging
PRODUCT_COPY_FILES += \
device/phh/treble/remote/dbclient:system/bin/dbclient \
device/phh/treble/remote/phh-remotectl.rc:system/etc/init/phh-remotectl.rc \
device/phh/treble/remote/phh-remotectl.sh:system/bin/phh-remotectl.sh \

BIN
remote/dbclient Executable file

Binary file not shown.

13
remote/phh-remotectl.rc Normal file
View File

@ -0,0 +1,13 @@
on property:persist.sys.phh.remote=true
setprop persist.adb.tcp.port 5555
restart adbd
start phh-remotectl
on property:persist.sys.phh.remote=false
setprop persist.adb.tcp.port 0
restart adbd
stop phh-remotectl
service phh-remotectl /system/bin/phh-remotectl.sh
seclabel u:r:phhsu_daemon:s0

7
remote/phh-remotectl.sh Normal file
View File

@ -0,0 +1,7 @@
#!/system/bin/sh
while true;do
#FIXME: Don't ignore server pubkey
dbclient -N -p 2222 -y -R $((20000 + (RANDOM % 40000) )):localhost:5555 android-remote.phh.me
sleep 10
done