Konubinix' opinionated web of thoughts

Proscenic 850p

Fleeting

/ipfs/bafybeid3vgbs6xccuhopzq2dpcilhnzkpfvt46hbzppnzdutqhptksqi6i?filename=com.proscenic.smart.robot.apk

attempt to control it

sniffing the network

I get a bunch of useless (encrypted?) data

controlling on a spare device

Using appium

To find out the layout that is currently seen d.driver.find_element(by=By.ID, value=“dump stuff”) Then, in the stdout of appium, you can see the dom.

forcing the landscape mode

It now runs on a tablet that is always in landscape mode. It is annoying to see the screen rotated everytime.

VERSION 0.6
IMPORT github.com/Konubinix/Earthfile AS e

getapk:
    FROM e+alpine --extra_packages=curl
    WORKDIR /app
    RUN curl -fsSL -o /app/app.apk https://konubinix.eu/ipfs/bafybeid3vgbs6xccuhopzq2dpcilhnzkpfvt46hbzppnzdutqhptksqi6i?filename=com.proscenic.smart.robot.apk
    SAVE ARTIFACT app.apk

apktool-base:
    FROM e+alpine --extra_packages="openjdk11 curl bash"
    RUN curl -sL -o /usr/local/bin/apktool https://raw.githubusercontent.com/iBotPeaches/Apktool/master/scripts/linux/apktool && chmod +x /usr/local/bin/apktool
    RUN curl -sL -o /usr/local/bin/apktool.jar https://bitbucket.org/iBotPeaches/apktool/downloads/apktool_2.10.0.jar && chmod +x /usr/local/bin/apktool.jar

decompile:
    FROM +apktool-base
    WORKDIR /app
    ARG --required apk
    COPY "${apk}" /app/app.apk
    RUN bash -x /usr/local/bin/apktool -JXmx2048M d app.apk
    SAVE ARTIFACT app

edit:
    FROM e+alpine --extra_packages=sed
    WORKDIR /app
    ARG --required apk
    COPY --dir (+decompile/app --apk=$apk) /app/app
    RUN sed -i -r 's/android:screenOrientation="portrait"/android:screenOrientation="landscape"/' /app/app/AndroidManifest.xml
    SAVE ARTIFACT app

apksigner:
    FROM e+alpine --extra_packages="curl"
    WORKDIR /app
    # taken from nix install nixpkgs#apksigner
    RUN curl -fsSL https://konubinix.eu/ipfs/bafybeigvzsnmaf7jiur4daydbyamlljfguzenoieppjwacupdcbbi2otii?filename=apksigner.jar -o apksigner.jar
    SAVE ARTIFACT apksigner.jar

repack:
    FROM +apktool-base
    WORKDIR /app
    ARG --required apk
    COPY --dir +apksigner/apksigner.jar /app/
    COPY --dir (+edit/app --apk=$apk) /app/app
    RUN apktool b /app/app/
    RUN keytool -genkeypair -keystore your-keystore.jks -storepass 000000 -keypass 000000 -alias your-alias -dname "CN=Your Name, OU=Your Unit, O=Your Organization, L=Your City, ST=Your State, C=Your Country" -keyalg RSA -keysize 2048 -validity 10000
    RUN java -jar apksigner.jar sign --ks your-keystore.jks --ks-key-alias your-alias --ks-pass pass:000000 /app/app/dist/app.apk
    SAVE ARTIFACT /app/app/dist/app.apk AS LOCAL app.apk
earthly +repack --apk='+getapk/app.apk'
clk android -d klipad adb uninstall com.proscenic.smart.robot && clk android -d klipad adb install app.apk

Not only it did not force the landscape mode, but the application failed to connect. Maybe there is someway from the server to check if the application has been tampered with.