My android app is getting resigned by robot framework , How I can turn off this

When I am trying to Install & run my app via robot framework then my app is getting resigned & because of that it’s throwing error . I checked SHA-256 key s getting changed by robot framework . Please let me know how I can turn off this?

I am certain that the fault it not from Robot Framework, or AppiumLibrary, they do not change files (binary or text).
Double check that you are using the correct file. Please post here what keywords you are using to upload the app (removing private/confidential info).

${APPIUM_SERVER} http://127.0.0.1:4723
${PLATFORM_NAME} Android
${DEVICE_NAME} Mukta Pixel New
${APP} ${EXECDIR}/app_path
${APP_PACKAGE} package name
${AutomationName} UiAutomator2
${TIMEOUT} 250s
${noSign} true

and keyword is : Open Application ${APPIUM_SERVER}
… platformName=${PLATFORM_NAME}
… deviceName=${DEVICE_NAME}
… app=${APP}
… appPackage=${APP_PACKAGE}
… automationName=${AutomationName}
… autoGrantPermissions=true

Are you sure you only have one APK file? Try to use a different PATH for ${APP} with the file you are certain the SHA256 is correct.
Try to see the logs of Appium server, in the part where it installs the app.

Yes I have only one APk file & I was getting error 90001 ,so I debug with debug build as well & found that here SSH-256 key is getting changed & app is getting resigned , that’s the reason we are getting this error .

The signing is not done by Robot Framework. It is normal to be resigned when making it to run in an emulator, but that is done by adb.

You can try to use the bundle (ADB), extract the apks and use that one. I really don’t know if this works, because I use real device, but I know that when extracting from bundle it resigns the apks.

*** Variables ***
${app_url}        ${CURDIR}/App/Android/Prod.apks

*** Test Cases ***
Example
    Open Application    ${appiumServer}    platformName=Android    platformVersion=${platformVersion}    deviceName=${deviceName}    automationName=UIAutomator2    appPackage=com.example.test    appActivity=com.example.test.MainActivity    app=${app_path}

To get the apks you need the tool from Google, for example:

${result}=    Process.Run Process    java -jar C:\\Path_to_tool\\bundletool-all-1.15.1.jar build-apks --bundle\=${path_to_bundle} --output\=${app_url}   stderr=STDOUT    shell=True    cwd=${CURDIR}\\App\\Android

Thanks for your reply. For emulator I can understand this and definitely will try this solution, but I am getting same issue when running on browerstack real devices as well. So can you please let me know a solution where it can work on browserstack device?

Now that you mention browserstack, they have in the documentation that the APK is resigned by them.

So, as you can now confirm, my suspicion was right. Robot Framework does not modify the APK.

It seems that your problem is not the resigning of APK, but some other.
Why should the resigning of APK be a problem?

Resigning of app cause problem, because in our app we have applied security check, that if app is resigned then we don’t allow to open the app. It’s checked via ssh-256 key.

There is nothing we can do on our Robot Framework side.

That is a decision PO should have.
Should a testing version be made without the signature check?