You need to grep the values returns by adb shell getprop
as in here.
For each value, you can set it in a variable, and then print it with the format you want.
Example:
model=$(adb shell getprop | grep model | cut -d ":" -f 2)
# Or, simpler
model=$(adb shell getprop ro.product.model)
echo "model='${model}'"
The OP 강승오 adds in the comments:
I got app ver from 'adb shell dumpsys package mypackage | grep"'versionName="
' and I checked I want to display App ver : 1.2.345
but, displayed on result App ver : versionName=1.2.345
.
how to solve this?
I tried set str
command set str:%str:versionName=:%
after then nothing displayed on app ver app ver :
(blank).
If you have set that result to a variable, you can replace the part you don't want:
res=$(adb shell dumpsys package mypackage | grep"'versionName=")
res=${res/versionName=/}
echo "res='${res}'