can non-root user install .apk by pm command? - Android Q&A, Help & Troubleshooting

Hi,
I have connected to a android device by SSH.I have trying now to install package by using pm command.The problem is I am not root now as I am not able to be root now.So can I use the pm command and if not then is there any way to install a package silently by command line.
Kindly give some idea .....
Thanks.

pradiptart said:
Hi,
I have connected to a android device by SSH.I have trying now to install package by using pm command.The problem is I am not root now as I am not able to be root now.So can I use the pm command and if not then is there any way to install a package silently by command line.
Kindly give some idea .....
Click to expand...
Click to collapse
No way..
Root is required to install a package silently. ADB shell can't bypass this requirement.

SachinShekhar said:
No way..
Root is required to install a package silently. ADB shell can't bypass this requirement.
Click to expand...
Click to collapse
Not true. Sideloading apps via adb does not require a rooted device.

pradiptart said:
Hi,
I have connected to a android device by SSH.I have trying now to install package by using pm command.The problem is I am not root now as I am not able to be root now.So can I use the pm command and if not then is there any way to install a package silently by command line.
Kindly give some idea .....
Thanks.
Click to expand...
Click to collapse
If you're connected now, why not just try it?

SifJar said:
If you're connected now, why not just try it?
Click to expand...
Click to collapse
Thanks all for your valuable reply,
I will let you know about this..
Thnaks

Theonew said:
Not true. Sideloading apps via adb does not require a rooted device.
Click to expand...
Click to collapse
I've just tested:
Code:
adb push app.apk /sdcard_root/app.apk
adb shell
$ pm install /sdcard_root/app.apk
Yes, it works. It has installed the app SILENTLY. I wonder why it doesn't work programmatically.

SachinShekhar said:
I wonder why it doesn't work programmatically.
Click to expand...
Click to collapse
It would be quite a security problem if apps were able to silently install other apps, especially so easily.

Related

cant root? i got a problem

im trying to root my atrix, i have followed the steps in the post however each time i type in the flash preinstall preinstall.img the cmd says that it cant be read....im lost. is there a easier way too root instead of cmd. btw im on 2.3.4 i did nothing to my phone, im just trying to root it so i cant install roms
Make sure that you put all your root files, on your pc, on c:\root, and not in a subdirctory. Then, while you're trying to root, make sure you are in that directory when you're entering the commands.
the files inside the folder i download have to be in a folder or just in C:\
also when im in cmd the whole time it says that im C:\documents and settings\something>
also im running windows xp on a macbook if that matters let me know
make a folder in c:\
To get to root directory in command prompt: "cd c:\" (+ any other folder destination that you want to get to).
ok i flashed the preinstall and rebooted the phone, do i have do go back to fastboot? or just stay with the phone on (but the cmd says phone not found)
mac208x said:
ok i flashed the preinstall and rebooted the phone, do i have do go back to fastboot? or just stay with the phone on (but the cmd says phone not found)
Click to expand...
Click to collapse
after reboot you should be done... and rooted. Run titanium backup to check or download rootcheck from the market
Bender B. Rodgriguez said:
after reboot you should be done... and rooted. Run titanium backup to check or download rootcheck from the market
Click to expand...
Click to collapse
what about the other stuff? i just did the preinstall and thats it
ok so when i do adb shell and than preinstall/su it says access denied.....
mac208x said:
ok so when i do adb shell and than preinstall/su it says access denied.....
Click to expand...
Click to collapse
Sorry I misunderstood you at first. I didnt realized u had just done preinstall stuff... Is usb debugging enabled on the phone??
Bender B. Rodgriguez said:
Sorry I misunderstood you at first. I didnt realized u had just done preinstall stuff... Is usb debugging enabled on the phone??
Click to expand...
Click to collapse
yes, should i put the usb as mass storage?
mac208x said:
yes, should i put the usb as mass storage?
Click to expand...
Click to collapse
No, it needs to be on usb debugging to use adb.
If i remember correctly one of the steps does give you an error but you just ignore it and type the rest of the commands. Im not sure if that is the step you are on though.. Im just recalling from memory. Complete the rest of the steps in the tutorial you are using and see if it works
Bender B. Rodgriguez said:
No, it needs to be on usb debugging to use adb.
If i remember correctly one of the steps does give you an error but you just ignore it and type the rest of the commands. Im not sure if that is the step you are on though.. Im just recalling from memory. Complete the rest of the steps in the tutorial you are using and see if it works
Click to expand...
Click to collapse
i did in fact ignored it but nothing happened
mac208x said:
i did in fact ignored it but nothing happened
Click to expand...
Click to collapse
have you tried
Code:
adb shell
/preinstall/dosu
instead?
everything says access denied >.<
Bender B. Rodgriguez said:
have you tried
Code:
adb shell
/preinstall/dosu
instead?
Click to expand...
Click to collapse
i tried everything
mac208x said:
i tried everything
Click to expand...
Click to collapse
well I'm about out of suggestions here. My only other one is to run cmd "as administrator" or you can flash an image with root built in.
However, it should work. this is the method I used to root my atrix and countless others as well. Also you may want to make sure you have the right device drivers installed too.
whats the other method? coz i just keep getting this stupid premission denied the whole time, or how do i know if im on admin cmd?
Get rootchecker from the market and check to see if you have root privileges.
mac208x said:
whats the other method? coz i just keep getting this stupid premission denied the whole time, or how do i know if im on admin cmd?
Click to expand...
Click to collapse
To run as admin right click cmd and choose the "run as admin" option.. If you are admin the directory you start out in is C:\
windows/system32.
i think thats the problem coz im running as "owner" but i cant get into admin becouse there is a password required that i dont know, anyone know what would be the password?

adb server is out of date ...killing?

Anyone know how to fix this?
I tried a reinstall of the PC Companion software, but that didn't do any good.
Regards,
Mike
Update android sdk
Tried that, and no dice, still doesn't work. Strangely enough, the rooting still worked.
Mike
panamamike said:
Anyone know how to fix this?
I tried a reinstall of the PC Companion software, but that didn't do any good.
Regards,
Mike
Click to expand...
Click to collapse
used to happen to me on ubuntu sometimes.
sudo ./adb kill-server
sudo ./adb start-server
make this a .sh file and run outside terminal.
if you run inside terminal, then it will give the error again after closing the terminal
gandhar said:
used to happen to me on ubuntu sometimes.
sudo ./adb kill-server
sudo ./adb start-server
make this a .sh file and run outside terminal.
if you run inside terminal, then it will give the error again after closing the terminal
Click to expand...
Click to collapse
Thanks for the idea.
I'm running Win7, I didn't explicity start adb.
Regards,
Mike
panamamike said:
Thanks for the idea.
I'm running Win7, I didn't explicity start adb.
Regards,
Mike
Click to expand...
Click to collapse
well then try starting as admin.
right click-run as admin, may work
try closing programs. like flashtool or something that is using adb or whatever
panamamike said:
Anyone know how to fix this?
I tried a reinstall of the PC Companion software, but that didn't do any good.
Regards,
Mike
Click to expand...
Click to collapse
might want to download this zip extract the files and put it in your path
adb-fastboot-and-other-tools-zip
remove the already existing adb.exe in SDK or rename it to some other name. and try adb commands.
it should work as iḿ using it every day.
PRESS THANKS IF I HELPED YOU!
Or go to
Settings > Xperia > Connectivity > USB connection mode > MSC.
:silly:
gouthamthemostwanted said:
might want to download this zip extract the files and put it in your path
adb-fastboot-and-other-tools-zip
remove the already existing adb.exe in SDK or rename it to some other name. and try adb commands.
it should work as iḿ using it every day.
PRESS THANKS IF I HELPED YOU!
Click to expand...
Click to collapse
I wanna root my Desire S for that I have to downgrade my HBoot but I dont know why thsi stupid adb push command is not working when I am trying to use tacoroot or zergrush getting the same stupid message dunno what to do!!!
Ryuvalietz said:
Or go to
Settings > Xperia > Connectivity > USB connection mode > MSC.
:silly:
Click to expand...
Click to collapse
11th October 2012 05:35 PM
azeunkn0wn
try closing programs. like flashtool or something that is using adb or whatever
Click to expand...
Click to collapse
Just for the record....i tried and it worked for me. So if someone have that problem....before installing some stuff, try that :good:
azeunkn0wn said:
try closing programs. like flashtool or something that is using adb or whatever
Click to expand...
Click to collapse
Yes. Closing the flashtool worked for me. If any one having problem try closing flashtool or something that is using adb.
That happens to me when i wanna start sdb server for manual root while having flashtool open.
For my case, I check USB debugging as it uncheck automatically...
Here
sMhsn said:
I wanna root my Desire S for that I have to downgrade my HBoot but I dont know why thsi stupid adb push command is not working when I am trying to use tacoroot or zergrush getting the same stupid message dunno what to do!!!
Click to expand...
Click to collapse
Search on google adbfix and open adbfix and find platform-tools/adb.exe then press fix do this icon :good: if it works
azeunkn0wn said:
try closing programs. like flashtool or something that is using adb or whatever
Click to expand...
Click to collapse
Thanks, that worked!

Device rooted but no access to /data folder

I just used Odin3 v3.04 and CF-Root-SGS3-v6.4 to root my Samsung Galaxy S III. It seems root worked because CWM was installed and as i tried to execute it, i had to grant root rights to this app. But i can't execute adb root since its telling me "adbd cannot run as root in production builds". I can't access /data through ES Explorer on my phone either. Does anyone have a solution?
Djablos said:
I just used Odin3 v3.04 and CF-Root-SGS3-v6.4 to root my Samsung Galaxy S III. It seems root worked because CWM was installed and as i tried to execute it, i had to grant root rights to this app. But i can't execute adb root since its telling me "adbd cannot run as root in production builds". I can't access /data through ES Explorer on my phone. Does anyone have a solution?
Click to expand...
Click to collapse
Try by flashing this zip file from CWM: http://download.chainfire.eu/370/SuperSU/UPDATE-SuperSU-v1.80.zip
That may fix your issue..
EDIT: this wont flash any new app to your SGS3, it will flash updated su script.
suyash1629 said:
Try by flashing this zip file from CWM: http://download.chainfire.eu/370/SuperSU/UPDATE-SuperSU-v1.80.zip
That may fix your issue..
EDIT: this wont flash any new app to your SGS3, it will flash updated su script.
Click to expand...
Click to collapse
I get the following message when i start CWM:
After that i cant see any possibility to flash something (or i dont really know what else do you mean by "flash from cwm")
Djablos said:
I get the following message when i start CWM:
After that i cant see any possibility to flash something.
Click to expand...
Click to collapse
just press ok and then press reboot in recovery mode and flash it through there.. else press the combination of Volume up + Power + Home button to enter the recovery.. you nneed to flash it through there
suyash1629 said:
just press ok and then press reboot in recovery mode and flash it through there.. else press the combination of Volume up + Power + Home button to enter the recovery.. you nneed to flash it through there
Click to expand...
Click to collapse
Unfortunately It didn't fix my issue. It don't get any message for "adb root" and device is getting disconnected after that.
Code:
>adb devices
List of devices attached
4df1ec9f1b844f57 device
>adb root
>adb devices
List of devices attached
Still no luck for access to the folder from the phone.
Djablos said:
Unfortunately It didn't fix my issue. It don't get any message for "adb root" and device is getting disconnected after that.
Code:
>adb devices
List of devices attached
4df1ec9f1b844f57 device
>adb root
>adb devices
List of devices attached
Still no luck for access to the folder from the phone.
Click to expand...
Click to collapse
Go to developer options and enable root access to both apps and adb, this may fix that problem..
suyash1629 said:
Go to developer options and enable root access to both apps and adb, this may fix that problem..
Click to expand...
Click to collapse
Do you mean developer options of the phone? I can't find any options there regarding root access. I checked SuperSU app, but there is also only list of apps with root access and no possibilities to add apps.
Djablos said:
Do you mean developer options of the phone? I can't find any options there regarding root access. I checked SuperSU app, but there is also only list of apps with root access and no possibilities to add apps.
Click to expand...
Click to collapse
yes it should be in developer options of the phone, m not sure if its in stock firmware.. if there is no such option than first try adb shell and then su, than it will prompt to give root access to shell. have you tried doing that?
suyash1629 said:
yes it should be in developer options of the phone, m not sure if its in stock firmware.. if there is no such option than first try adb shell and then adb su, than it will prompt to give root access to shell. have you tried doing that?
Click to expand...
Click to collapse
Well now we're talking! I didn't know there is a possibility to gain root that way. Thank you for your help!
Djablos said:
Well now we're talking! I didn't know there is a possibility to gain root that way. Thank you for your help!
Click to expand...
Click to collapse
well thats nothing, but why do you want to do by using adb?
suyash1629 said:
well thats nothing, but what do you want to do by using adb?
Click to expand...
Click to collapse
I want to pull some apps to my PC to decompile them. I'm preparing myself for a seminar on my uni.
Djablos said:
I want to pull some apps to my PC to decompile them. I'm preparing myself for a seminar on my uni.
Click to expand...
Click to collapse
oh.. and as i said above to use adb shell and then adb su, that might too work but simply use su after adb shell, i dont know how i entered adb su.
suyash1629 said:
oh.. and as i said above to use adb shell and then adb su, that might too work but simply use su after adb shell, i dont know how i entered adb su.
Click to expand...
Click to collapse
Well, since i logged once with adb as root, the phone seems to give now permanently root access to adb. So i just used "adb pull /data/app/com...." with no problem.
Djablos said:
Well, since i logged once with adb as root, the phone seems to give now permanently root access to adb. So i just used "adb pull /data/app/com...." with no problem.
Click to expand...
Click to collapse
thats fine but next time you can also use su to be root user over adb.. maybe next time also adb root wont work and you have to use adb shell asnd su to be root user..
suyash1629 said:
thats fine but next time you can also use su to be root user over adb.. maybe next time also adb root wont work and you have to use adb shell asnd su to be root user..
Click to expand...
Click to collapse
Well to be precise, "adb root" still doesnt work, so i can gain root access only over shell->su. But it is completely sufficient for my purposes.
Djablos said:
Well to be precise, "adb root" still doesnt work, so i can gain root access only over shell->su. But it is completely sufficient for my purposes.
Click to expand...
Click to collapse
adb root is not working because root access to adb is not available from developers option, so thats only way to gain root access. And also best of luck for seminar..
suyash1629 said:
And also best of luck for seminar..
Click to expand...
Click to collapse
Thanks, I will definitely need some luck
Real Root
Real root is odin root!

[Q] Firefox OS Root

I have a Nexus 7 (2013/flo/razor) with Firefox OS installed. Is there a way to "Root" the device? and if so, what could it do?
Can u tell more about your problem ?
rakoczy12 said:
Can u tell more about your problem ?
Click to expand...
Click to collapse
I am asking if it is possible to root the device on FirefoxOS
Yoyodude1124 said:
I am asking if it is possible to root the device on FirefoxOS
Click to expand...
Click to collapse
Root to accomplish what?
If you use adb and the adb shell, you effectively have root access to the device and can muck about.
Saijin_Naib said:
Root to accomplish what?
If you use adb and the adb shell, you effectively have root access to the device and can muck about.
Click to expand...
Click to collapse
You could have adb and adb shell without being root. In that case, you would have restricted permissions in your device. For example, you couldn't edit manually the wpa_supplicant.conf.
You could get root If you set ro.secure to 1. The best way to do it in a non-root build (and If you don't want to flash a new build with the env variablle VARIANT=eng), is to flash the boot.img from a rooted build.
That way, for example, I was able to root an user build to do some test and fixes.

Android Stock Keyboard on Wear Devices(Working on Moto360)

Hi i tryed sideload android stock keyboard on moto360. After install and enabling i can use stock keyboard . Edges difficult for pushing like a,z,p,delete keys. And Dictionaries can be download from Android Keyboard Gui.
for installing step by step:
firs download apk : http://apps.evozi.com/apk-downloader/?id=com.google.android.inputmethod.latin
enable debuggind both watch and phone.
Connect via adb with :
Code:
adb forward tcp:4444 localabstract:/adb-hub
adb connect localhost:4444
install apk to watch (it can be long, don't worry):
Code:
adb -s localhost:4444 install com.google.android.inputmethod.latin.apk
After installing enable keyboard default:
Code:
adb -s localhost:4444 shell ime enable com.google.android.inputmethod.latin/com.android.inputmethod.latin.LatinIME
adb -s localhost:4444 shell ime set com.google.android.inputmethod.latin/com.android.inputmethod.latin.LatinIME
Thats it, now you can use keyboard.
Here is the screenshoot:
Thanks...
this is awesome
kovcoo said:
Thanks...
this is awesome
Click to expand...
Click to collapse
Thanks. But can you tell us for updating post, which wear device are you using?
zhackary said:
Thanks. But can you tell us for updating post, which wear device are you using?
Click to expand...
Click to collapse
Moto360
works on Sony SmartWatch 3. I installed Android Terminal Emulator as well.
Works on wear live very well. Thanks for the info.
...
[Q]
how can i delete it ? i consumes a lot of battery
o-ellinas said:
how can i delete it ? i consumes a lot of battery
Click to expand...
Click to collapse
Connect via adb with :
adb forward tcp:4444 localabstract:/adb-hub
adb connect localhost:4444
adb -s localhost:4444 unistall -k com.google.android.inputmethod.latin
Download link not working.. can somebody give another link to download the keyboard apk???
amritpal2489 said:
Download link not working.. can somebody give another link to download the keyboard apk???
Click to expand...
Click to collapse
Link is working but here is the mirror: https://drive.google.com/file/d/0Bz2XKqRXsgUldkd3VkJqTXRMTVU/view?usp=sharing
Did you sideload or just send using adb
sent from MY Supercharged g3
---------- Post added at 11:20 PM ---------- Previous post was at 11:20 PM ----------
ranf said:
works on Sony SmartWatch 3. I installed Android Terminal Emulator as well.
View attachment 3119329
View attachment 3119330
Click to expand...
Click to collapse
How did you do this?
sent from MY Supercharged g3
Code:
adb install Filename.apk
adb shell
ime ...
If you have a watch that can connect to your computer via charging cradle and USB cable such as the g watch, it is possible to sideload apps directly instead of over bluetooth. The advantage to this is that it is much faster.
Simply plug the charging cradle in to the computer, open up adb, and type adb devices.
You will be prompted from your phone to grant permissions to the computer.
Next, run the command: adb -d install filename.apk
Adb debugging must be enabled on watch via Dev options
I tried to install this app on my Smartwatch 3 but I get
Failure [INSTALL_FAILED_NO_MATCHING_ABIS]
Click to expand...
Click to collapse
Could someone help me please ??
Thanks !
mister-gwada97one said:
I tried to install this app on my Smartwatch 3 but I get
Could someone help me please ??
Thanks !
Click to expand...
Click to collapse
I think Google updated its keyboard since I get the same error.
Using zhackary's mirror did work for me, so I suggest you to try that.
wouter-visser said:
I think Google updated its keyboard since I get the same error.
Using zhackary's mirror did work for me, so I suggest you to try that.
Click to expand...
Click to collapse
Thanks a lot. This mirror worked for me too.
Hello Guys,
do you know if there's a way to add french language to the keyboard please ?
When I tap on languages Google keyboard stops.
Thanks !
zhackary said:
Thanks. But can you tell us for updating post, which wear device are you using?
Click to expand...
Click to collapse
Samsung Wear Live.
This works very well. Thanks!
Its work!!! thank you so much this better then any other input methods i'd tried before...
you're the best!!!

Categories

Resources