remote-android / redroid-doc

redroid (Remote-Android) is a multi-arch, GPU enabled, Android in Cloud solution. Track issues / docs here
4.11k stars 295 forks source link

Battery emulation on Android 12+ #735

Closed rtedpro-cpu closed 3 days ago

rtedpro-cpu commented 3 weeks ago

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] It would be useful if some app needs it.

Describe the solution you'd like A clear and concise description of what you want to happen. Maybe some argument or anything else to do the battery emulation?

rtedpro-cpu commented 2 weeks ago

@zhouziyang Hello?

rtedpro-cpu commented 2 weeks ago

Found out that Battery Emulation Works on Android 8.1 to 11 But if you attempt in Android 12+ it wont work since theres no battery detected Any fix on Android 12+ @zhouziyang

pdobrev commented 1 week ago

@rtedpro-cpu did you figure out how to make it work on 12+? Doing adb shell dumpsys battery set level 90 seems to set the level to 90%, but the battery is still reported to not be recognized.

rtedpro-cpu commented 1 week ago

@pdobrev Nope but it's possible if you look at redroid script all of the screenshots using Android 12 and 13 have battery charging. Would need a answer from @zhouziyang but being ignored.

pdobrev commented 1 week ago

Maybe we should keep the issue open then?

rtedpro-cpu commented 1 week ago

Forgot to include that Bliss OS 17.2 Alpha using Android 14 seems the battery sometimes is recognized and sometime isnt but it will always register it like it had a battery using adb shell dumpsys battery set level 80 works

rtedpro-cpu commented 1 week ago

Ok sounds like good idea

rtedpro-cpu commented 1 week ago

Still no response.

zhouziyang commented 1 week ago

Battery is not emulated in redroid. Try porting from Android Emulator (health HAL).

rtedpro-cpu commented 1 week ago

Any Android Emulator or Android Studio?

rtedpro-cpu commented 1 week ago

Apperently adb shell dumpsys battery set level 90 works on Android 12+ just the battery status on status bar isnt being changed as it thinks there is no battery but you still can change it (tested on redroid 14) Screenshot_20240907-085830