openstf / STFService.apk

Monitor and perform various actions on your Android device. Not meant for actual user devices.
Other
242 stars 207 forks source link

Android Q upgrade #33

Closed jmauffret closed 4 years ago

jmauffret commented 5 years ago

STFService doesn't run under Android Q due to several permission problems

jmauffret commented 5 years ago

To avoid the error "Error: app is in background uid null", use the following command : adb shell am start-foreground-service --user 0 -a jp.co.cyberagent.stf.ACTION_START -n jp.co.cyberagent.stf/.Service So we have to replace "startservice" by "start-foreground-service".

jmauffret commented 5 years ago

In the source code:

sorccu commented 5 years ago

Thanks for having a look! Maybe you could create a pull request with your changes?

jmauffret commented 5 years ago

Yes I can do it. But there are other issues to resolve in the class GetPropertiesResponder concerning permissions:

2019-03-19 15:48:21.547 15334-15441/jp.co.cyberagent.stf W/System.err: java.lang.SecurityException: getDeviceId: The user 10168 does not meet the requirements to access device identifiers. 2019-03-19 15:48:21.547 15334-15441/jp.co.cyberagent.stf W/System.err: at android.os.Parcel.createException(Parcel.java:2059) 2019-03-19 15:48:21.548 15334-15441/jp.co.cyberagent.stf W/System.err: at android.os.Parcel.readException(Parcel.java:2027) 2019-03-19 15:48:21.548 15334-15441/jp.co.cyberagent.stf W/System.err: at android.os.Parcel.readException(Parcel.java:1977)

jmauffret commented 5 years ago

Then to avoid Security Permission I have hardcoded the following methods in class GetPropertiesResponder : getDeviceId, getSubscriberId, getLine1Number, getSimSerialNumber. I should investigate more to find a workaround. But it works now on my Pixel 3 XL (Q preview) : you need to be rooted to enforce SELinux security policy and also a patch on minicap.

hujiachun commented 5 years ago

Can you submit the latest code to github?

histronger commented 5 years ago

Any progress on supporting Android Q for stfservice.apk? Thank you!

koral-- commented 4 years ago

PR adding Android 10 https://github.com/openstf/STFService.apk/pull/38 has been merged. Release is in progress.