[Q] How to ADB push?

Search This thread

hellhunter

Member
Dec 30, 2009
7
0
So I discovered the sbf I was using was not a stock one. Once I figured that out and got the right files I got it all working and even decided to move on to eclipse 2.2. Still can't push to the folders but unnecessary at this point.

Sent from my DROID X2 using XDA on Eclipse 2.2
 
So I discovered the sbf I was using was not a stock one. Once I figured that out and got the right files I got it all working and even decided to move on to eclipse 2.2. Still can't push to the folders but unnecessary at this point.

Sent from my DROID X2 using XDA on Eclipse 2.2

Ummmm
Where did you get a non stock sbf file from????

And ate you sure you are doing the command right?
Whaerror you get??
 

hellhunter

Member
Dec 30, 2009
7
0
It was a packaged Linux ISO file from 1KDS I believe. First thing I just happened to find. It wasn't a direct sbf file. I was using all the right commands just as in the beginning of this thread. I haven't tried since I managed to get everything working right now. When I get some time I'll see what it does now.

Sent from my DROID X2 using XDA on Eclipse 2.2
 
It was a packaged Linux ISO file from 1KDS I believe. First thing I just happened to find. It wasn't a direct sbf file. I was using all the right commands just as in the beginning of this thread. I haven't tried since I managed to get everything working right now. When I get some time I'll see what it does now.

Sent from my DROID X2 using XDA on Eclipse 2.2

Ooo the boot disk one
Something you had to burn to a cd
Then boot to bios to use or something?

Yea that's not the same as the sbf you flash with rsdlite lol
Lucky you didn't mess something up :p
Glad you didn't :)
 

meskes

Senior Member
Feb 7, 2012
230
41
Tucson
Thanks for that! It's not quite what I'm aiming to eventually do, but did give me more insight on how the whole adb/shell/su systems work. From inside of su, I was able to mount the /system as RW, however I'm only able to do this from inside of SU. I want to be able to do this from the initial CMD so that I can ADB PUSH from my computer to the phone.

Here's my latest log:
Code:
C:\android-sdk>adb shell

[[TRYING TO MOUNT FROM ADB SHELL]]
$ mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
mount: Operation not permitted

[[TRYING TO MOUNT FROM ADB SHELL USING BUSYBOX]]
$ busybox mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
busybox mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
mount: permission denied (are you root?)

[[GO TO SU]]
$ su
su

[[MOUNTING AS RW SUCCESSFUL]]
# mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system

[[COPYING A FILE INSIDE /SYSTEM SUCCESSFUL]]
# cp framework/framework-res.apk framework/framework-res-test.apk
cp framework/framework-res.apk framework/framework-res-test.apk

[[REMOUNTING /SYSTEM AS RO]]
# mount -o ro,remount -t ext3 /dev/block/mmcblk1p21 /system
mount -o ro,remount -t ext3 /dev/block/mmcblk1p21 /system

[[ATTEMPTING TO COPY AGAIN, FAILED]]
# cp framework/framework-res.apk framework/framework-res-test2.apk
cp framework/framework-res.apk framework/framework-res-test2.apk
cp: can't create 'framework/framework-res-test2.apk': Read-only file system
#

So now the question is, how do I mount as R/W so I can use ADB push?

Wes

Yes.

Sent from my Motorola Android Device, using Tapatalk.
 

HEXcube

Senior Member
Aug 18, 2012
118
51
HEXcube.github.io
Set ro.secure=0

As you might have heard,set ro.secure=0 in default.prop. But, this is no easy job. Every time you boot the device the new default.prop'll get overwritten due to contents of boot partition being reloaded on each boot. You need to flash a boot.img with it's default.prop's ro.secure=0. If it was Android 4.0 , you could have used ro.secure=0 in data/local.prop which is easy to create.
This is not much of an issue as most of the adb root/insecure adb's capabilities can be achieved with su and busybox in adb shell. You may refer to this post for more ways:adb root. If i sound like an expert here :), know that i've also just started to experiment around this adb stuff. Please reply if there are any mistakes.
 

VioletR

Member
Nov 25, 2012
36
54
www.violetvelly.com
How to Get ADB working without A-SDK/J-SDK on your HOST PC

Well for few Months ago even I was struggling hard to use all this ADB and fastboot stuff, Later I get to know to use a easier Method to get my adb and fastboot working

What I do is as follows:

(1) You may not need Android-SDK and Java-SDK to be installed on Host PC
(If it is installed valent GOOD for other dev. tasks)
(2) Download Android.zip and Extract Android folder. Just < 3MB stuff Download from Link below
(3) Copy this whole folder to C:\
(4) Now you have got a new adb.exe directory i.e C:\android (Well you can place this folder anywhere u want , only thing is that you have to cd this location whenever you need access to the 'adb.exe' or 'fastboot.exe' sitting in this folder.
(5) This folder also contains working adb_usb.ini and android_winusb.ini and other essential drivers and stuff

Your adb access cant be successful failing on following: CHECK THIS
(1) Device must be conected with USB Debugging marked "ON" (Check in Settings-->Developement)
(2) You must have installed latest device drivers on your Host PC
(3) On successful driver installation; You must see "Android Composite ADB Interface" under "Android" in your device manager while device is connected
(4) If your adb access fails after a Reboot/ or while moving to various modes like fastboot/recovery/adb then Open Task manager --Go to Process--locate adb.exe and kill it--Close. Reopen cmd and start over.

Commands and How Things will reflect on cmd:
Lets guess you have adb.exe directory as C:\Android
and you want to push a APK named Titanium_Backup.apk into /system/app and want to install it

(1) Start cmd:
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.


C:\Documents and Settings\USERNAME>

(2) CD your adb directory
[Windows 7 or higher user can drectly opne cmd from this their Android folder with Shift+Right Click-->Open Command Prompt from here]

C:\Documents and Settings\USERNAME>CD C:\Android

C:\Android>

(3) Now you are in your adb.exe directory. Let check the status of device connection to your Host PC

C:\Android>adb devices
List of devices attached
Micromax-A56 device (This confirms your device is communication with you PC)

(4) Let check the Root Status and do mounting the file systems


C:\Android>adb root
restarting adbd as root (Device will flash for a instance and if you have root access it will allow you to access "root")

C:\Android>adb remount rw
remount succeeded (If no proper root access it won't allow you to remount filesystem as "rw".)

[If you getting error like remount failed then you need to check your root status or eithe have to root again with proper guidelines. You can try with updating su binaries]. I guess you get succeeded message as you have proper root access... like I have...

(5) Using adb push and adb shell commands to install a system or data application on your device:
Apk name: Titanium_Backup.apk [Copy it to C:\Android. There must not be any space in file name; if so fill it with . or _ ]

C:\Android>adb push Titanium_Backup.apk /system/app [this will copy apk to /system/app]
2303 KB/s (5787419 bytes in 2.453s)

C:\Android>adb shell chmod 644 /system/app/Titanium_Backup.apk [this will change the permissions to RW-R-R (644)]

C:\Android>adb reboot [on a reboot you will find Titanium Backup is installed and working]

In general to install a app you have to use following commands:
C:\Android>adb push<space><APK_Name.apk><space><DirectoryPath>
C:\Android>adb shell chmod 644<space><Device_Directory>/<APK_Name.apk>
Note: To carry out above thing your apk must be copied to the adb.exe directory i.e in Android folder on C:\

:fingers-crossed:Well this guide is for newbies..and similarly you can find various commands to work with 'adb' or 'fastboot' or in 'recovery' mode.
 

Attachments

  • Android.rar
    1.3 MB · Views: 67

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    How to Get ADB working without A-SDK/J-SDK on your HOST PC

    Well for few Months ago even I was struggling hard to use all this ADB and fastboot stuff, Later I get to know to use a easier Method to get my adb and fastboot working

    What I do is as follows:

    (1) You may not need Android-SDK and Java-SDK to be installed on Host PC
    (If it is installed valent GOOD for other dev. tasks)
    (2) Download Android.zip and Extract Android folder. Just < 3MB stuff Download from Link below
    (3) Copy this whole folder to C:\
    (4) Now you have got a new adb.exe directory i.e C:\android (Well you can place this folder anywhere u want , only thing is that you have to cd this location whenever you need access to the 'adb.exe' or 'fastboot.exe' sitting in this folder.
    (5) This folder also contains working adb_usb.ini and android_winusb.ini and other essential drivers and stuff

    Your adb access cant be successful failing on following: CHECK THIS
    (1) Device must be conected with USB Debugging marked "ON" (Check in Settings-->Developement)
    (2) You must have installed latest device drivers on your Host PC
    (3) On successful driver installation; You must see "Android Composite ADB Interface" under "Android" in your device manager while device is connected
    (4) If your adb access fails after a Reboot/ or while moving to various modes like fastboot/recovery/adb then Open Task manager --Go to Process--locate adb.exe and kill it--Close. Reopen cmd and start over.

    Commands and How Things will reflect on cmd:
    Lets guess you have adb.exe directory as C:\Android
    and you want to push a APK named Titanium_Backup.apk into /system/app and want to install it

    (1) Start cmd:
    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.


    C:\Documents and Settings\USERNAME>

    (2) CD your adb directory
    [Windows 7 or higher user can drectly opne cmd from this their Android folder with Shift+Right Click-->Open Command Prompt from here]

    C:\Documents and Settings\USERNAME>CD C:\Android

    C:\Android>

    (3) Now you are in your adb.exe directory. Let check the status of device connection to your Host PC

    C:\Android>adb devices
    List of devices attached
    Micromax-A56 device (This confirms your device is communication with you PC)

    (4) Let check the Root Status and do mounting the file systems


    C:\Android>adb root
    restarting adbd as root (Device will flash for a instance and if you have root access it will allow you to access "root")

    C:\Android>adb remount rw
    remount succeeded (If no proper root access it won't allow you to remount filesystem as "rw".)

    [If you getting error like remount failed then you need to check your root status or eithe have to root again with proper guidelines. You can try with updating su binaries]. I guess you get succeeded message as you have proper root access... like I have...

    (5) Using adb push and adb shell commands to install a system or data application on your device:
    Apk name: Titanium_Backup.apk [Copy it to C:\Android. There must not be any space in file name; if so fill it with . or _ ]

    C:\Android>adb push Titanium_Backup.apk /system/app [this will copy apk to /system/app]
    2303 KB/s (5787419 bytes in 2.453s)

    C:\Android>adb shell chmod 644 /system/app/Titanium_Backup.apk [this will change the permissions to RW-R-R (644)]

    C:\Android>adb reboot [on a reboot you will find Titanium Backup is installed and working]

    In general to install a app you have to use following commands:
    C:\Android>adb push<space><APK_Name.apk><space><DirectoryPath>
    C:\Android>adb shell chmod 644<space><Device_Directory>/<APK_Name.apk>
    Note: To carry out above thing your apk must be copied to the adb.exe directory i.e in Android folder on C:\

    :fingers-crossed:Well this guide is for newbies..and similarly you can find various commands to work with 'adb' or 'fastboot' or in 'recovery' mode.
    1
    Sorry i couldn't be more help. I am new to adb and may have done more to get it working. I'm sure there's someone else around here that can help u out.

    Sent from my DROID X2 using XDA App
    1
    Ro.secure is in your local.prop on the root of your phone. As far as your issue you have to reset permissions in order to push to /system. I saw that you were trying to do that but with no success. I believe I know what will help but I will have to find it and repost.

    http://xdaforums.com/showthread.php?t=1133528

    Ok look at the command lines at the bottom of the op. You are going to use adb shell. Follow that almost exactly but adjust according to your directories. Should go into adb shell, gain su permissions, mount /system rw, push your apk, then don't worry about remounting as ro, just reboot. Pay close attention to spaces.

    Sent from my DROID X2 using xda premium
    1
    So now the question is, how do I mount as R/W so I can use ADB push?

    Wes

    Try:
    Code:
    adb devices
    adb remount
    adb push [filename] [destination]
    adb reboot
    the "adb remount" remounts the fs RW instead of the default RO.
    1
    did you ever get this figured out? I'm having the same frustrations on mine. Mine won't install the 2.3.5 update due to it not recognizing the Quickoffice.apk and I'm trying to push the files manually, but I'm having no luck getting past the same you've posted here.

    Do this
    Sbf to 2.3.4
    (or 2.3.3& take one ota To get to 2.3.4...however you want to do it..just be bone stock 2.3.4 ;) )
    Root your device.
    BUT DO NOT USE ZERGRUSH TO ROOT
    Use petes Motorola one click root method.
    Then continue the process as normal from there on out.
    Trust me in this. Zergrush root method is not playing nice with your /system partition, (if you notice during the root process it might say something like "making room in system,"= or "moving/deleting app to make room" something similar)
    And when it does that, it's messing up how the update checks for untouched stock apps.
    Let me know how it goes.
    This solution has worked for COUNTLESS others so far, zergrush has always been the culprit when it comes to failing to find certain apk or system file that needs to be there for the update to install.

    From my nexus tappin the talk
    <edit post successful>