dimanche 24 juillet 2016

Save result adb command in set /p name= (Bat file)

I want to save the result of the adb commands below as a variable in my script, but the result is wrong.

adb shell getprop ro.product.brand

Output:Samsung

adb shell getprop ro.product.model

Output: SM-G920I

set /p Brand=adb shell getprop ro.product.brand
set /p Model=adb shell getprop ro.product.model
echo Brand: %Brand% Model: %Model% > Test.txt

But the result is:

Brand: 0 Model: 0 

Any Suggestions?

Aucun commentaire:

Enregistrer un commentaire