aws / lumberyard

Amazon Lumberyard is a free AAA game engine deeply integrated with AWS and Twitch – with full source.
Other
2.04k stars 541 forks source link

Deploy Android application fails to start application at mobile device #479

Open gitrndlab opened 4 years ago

gitrndlab commented 4 years ago

Describe the bug When I "Deploy to local device" my Android Application (builded in Android Studio and deployed to device also there) do not restart project at mobile device. The logs show "[ERROR] Failed to unlock screen". But the content is changed so when I start my app manually I see new content. It just not start it automatically.

Steps to reproduce

  1. Click "Deploy" buton in Editor,
  2. In my case with unselected "Build game" option - I cannot test it as I described in previous issue,
  3. Set other options and choose Mode: Local files (I didn't test it with VFS yet),
  4. Click "Deploy to local device" buton.

Expected behavior The content in my application is updated or my application gets started or restarted.

Screenshots/Logs

[INFO] Processing assets...
[INFO] Running WAF command: lmbr_waf.bat deploy_android_armv8_clang_profile --enabled-game-projects=TestProject -pall --from-editor-deploy --deploy-android=True --deploy-android-asset-mode=loose --deploy-android-clean-device=False --deploy-android-executable=False --deploy-android-replace-apk=False --deploy-android-device-filter=5f5565c9
[WAF] Engine Root: I:\Amazon\lumberyard\dev\
[WAF] Executing 'deploy_android_armv8_clang_profile'
[WARN] Invalid module 'AmazonQtControlGallery' in spec 'all'
[WARN] Invalid module 'LyIdentity_shared' in spec 'all'
[WARN] Invalid module 'LyIdentity_static' in spec 'all'
[WARN] Invalid module 'LyInstallerMetrics' in spec 'all'
[WARN] Invalid module 'LyMetricsConsumer' in spec 'all'
[WARN] Invalid module 'LyMetricsProducer_python' in spec 'all'
[WARN] Invalid module 'LyMetricsProducer_shared' in spec 'all'
[WARN] Invalid module 'LyMetricsProducer_static' in spec 'all'
[WARN] Invalid module 'LyMetricsShared_shared' in spec 'all'
[WARN] Invalid module 'LyMetricsShared_static' in spec 'all'
[WARN] Invalid module 'LyzardGems' in spec 'all'
[WARN] Invalid module 'LyzardEngines' in spec 'all'
[WARN] Invalid module 'LyzardProjects' in spec 'all'
[WARN] Invalid module 'NewsBuilder' in spec 'all'
[WARN] Invalid module 'ToolsCrashUploader' in spec 'all'
[WARN] Invalid module 'SerializeContextTools' in spec 'all'
[WARN] Invalid module 'DeltaCataloger' in spec 'all'
[WARN] Module use dependency 'CrashHandler' for target 'CrySystem' refers to an invalid module
[WARN] Module use dependency 'billing' for target 'InAppPurchases' refers to an invalid module
[WARN] Using deprecated option --deploy-android-asset-mode, option has been renamed to --android-asset-mode
[INFO] Starting to deploy to android device 5f5565c9
[INFO] Scanning 3297 files to determine which ones need to be copied...
[1/7] adb_copy_output (android_armv8_clang|profile): Cache\TestProject\es3\bootstrap.cfg
[2/7] adb_copy_output (android_armv8_clang|profile): Cache\TestProject\es3\system_android_es3.cfg
[3/7] adb_copy_output (android_armv8_clang|profile): Cache\TestProject\es3\testproject\assetcatalog.xml
[4/7] adb_copy_output (android_armv8_clang|profile): Cache\TestProject\es3\testproject\levels\simple\filelist.xml
[5/7] adb_copy_output (android_armv8_clang|profile): Cache\TestProject\es3\testproject\levels\simple\level.pak
[6/7] adb_copy_output (android_armv8_clang|profile): Cache\TestProject\es3\testproject\levels\simple\tags.txt
[WAF] 'deploy_android_armv8_clang_profile' finished successfully (3.634s)
[INFO] Valid shader compiler detected.
[ERROR] Failed to unlock screen
**** Deploy Failed! *****

Lumberyard version 1.23.1 with fix from 472 issue.

AMZN-alexpete commented 4 years ago

Hi @researchdeveloping

We've created LY-112666 to track this issue internally. Does the phone have a pass code to unlock? If yes, then there isn't much we can do. If the phone does not have a pass code, please provide the following information:

  1. Manufacturer
  2. Model
  3. OS version

Thanks!

gitrndlab commented 4 years ago

Hi @AMZN-alexpete,

Correct the phone has a pass code (fingerprint and geom figure unlock). But as I see this error happens even when my phone is unlocked. It is: Xiaomi Mi 9T Pro os: MIUI 11.0.5.0 with Android 10 QKQ1.190825.002 (but it is updated last time, this issue I registered with previous version of os - so let's me know if I should make a retest).

Thanks!

JennaDoll commented 4 years ago

Have you tried disabling unlock screen and removing the password and finger touch for the password to enter the phone?

AMZN-Gene commented 4 years ago

Just as a heads up "lmbr_waf deploy" doesn't actually start the application, it only "deploys" the exe and/or assets to the device (I was confused by this as well :x). For example, if you wanted to push a minor asset change and restart the app you could use lmbr_waf deploy followed by some ADB calls to restart the app. You could use this powershell script to stop the app, "deploy" asset changes, and restart the app

function LyDeployAndroidAssetsAndStartApp()
    # use adb shell pm list packages | grep com.lumberyard to see all the available lumberyard packages... for now hard-coding instead
    $game_package_name = "com.lumberyard.yourgame"

    adb shell am force-stop $game_package_name

    .\lmbr_waf.bat deploy_android_armv8_clang_profile -p all --deploy-android-executable=False --deploy-android-clean-device=False

    $activity_name = adb shell cmd package resolve-activity --brief $game_package_name | tail -n 1  # tail -n 1 grabs the last word in this string which happens to be the full packname we're looking for
    adb shell am start $activity_name