This is an intended behavior. I think this answer in Stackoverflow might have a workaround that would work for you.
https://stackoverflow.com/questions/25477424/adb-shell-su-works-but-adb-root-does-not -- Rex On Wed, Mar 20, 2019 at 9:11 AM radhika somaiya <somaiyaradhika...@gmail.com> wrote: > Hi Everyone, > > I learnt that android comes with three kind of build variants - user, > userdebyg and eng > > However I am trying to install an .apk package in user type of build > variant but somehow it's getting failed with following error : > > "adb d cannot run as root in production builds" > > I want to know that is it necessary to use either userdebug or eng for > installing apk application on command line or we can install any .apk with > user build? > > Any help would be appreciated! > > Thank You, > Radhika Somaiya > > -- > -- > unsubscribe: android-porting+unsubscr...@googlegroups.com > website: http://groups.google.com/group/android-porting > > --- > You received this message because you are subscribed to the Google Groups > "android-porting" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to android-porting+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- -- unsubscribe: android-porting+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-porting --- You received this message because you are subscribed to the Google Groups "android-porting" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-porting+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.