[TOOLS][ADB][Windows]Push files to device through ADB*now include deodex tools* - Galaxy Tab 8.9 Android Development

See my previous post before in post#2
This is a simple batch file using ADB..
With this you can use ADB to manage your file or APK , Backup, Push Your File to device, or pull file from device..
ADB Work on Stand by Mode (Home Screen) or in Recovery Mode, just set it up..
Extract ADBTOOLSv1.0.1.zip and you will find :
command.bat : Windows Batch Command
_BACKUP_OUT : folder where your backup process done and made
_FLASHING_OUT:
folder for flashing your :
kernel (place your boot.img here)
recovery (place your recovery.img here),
modem (place your modem.bin here)--only for gt p7300
_MODDING_FILE: Folder where your file were created by PULL process
Folder where file for PUSH process should be here
_BATCH_INSTALL : place your APK here for batch install
tools: ADB.exe and busybox binary
success_APK : A folder created for All apk from _BATCH_INSTALL move here after instalation.
Click to expand...
Click to collapse
Notes:
ADB can access all file from device from CWM Recovery, especially CWMR 5.5.0.4
ALL you need to do is:
From Recovery menu, you need to mount /data and /system for ADB working..
THEN, From Command Prompt set ADB Mode to "recovery".(This Batch File set ADB mode to "Home Screen" by default)
So when you use ADB from Online device ( I mean a stand by device).. you dont need to change ADB Mode..
After you set up, you can use ADB as you like..
Code:
=============================================================================
:::: ADB TOOLS FOR GT P7300 and P7310 by suwandiapr
-----------------------------------------------------------------------------
| [*] Before use read this:
| --make sure you have installed adb drivers for your device
| --enable "USB DEBUGGING"
| from (Menu\Settings\Applications\Development)
| --enable "UNKNOWN SOURCES"
| from (Menu\Settings\Applications)
| --increase screen timeout to 10 minutes
| --connect USB cable to PHONE and then connect to PC
| --MAKE SURE YOU HAVE A ROOTED DEVICE AND BUSYBOX
| --Place the right file in the right folder
| --Some feature like Flashing need more tester..so please be aware
| --If you use adb recovery feature, set ADB Mode to recovery
| mount /data and /system from your device recovery
| --If you use adb from homescreen, set ADB Mode to HomeScreen
| --All you Do is your own Risk, use with carefull
-----------------------------------------------------------------------------
****Turn on the screen and allow superuser permission when asked!****
_____________________________________________________________________________
| Current MODDING FILE: NONE | ADB MODE :HomeScreen | sdcard path: /sdcard/|
=============================================================================
:::: ADB PULL ::::
=============================================================================
0 Pulling file from /data ( see result in _MODDING_FILE)
1 Pulling file from /system partition ( see result in _MODDING_FILE)
2 Pulling file from SDcard ( see result in _MODDING_FILE)
3 Backup recovery ( see result in _BACKUP_OUT)
4 Backup Kernel ( see result in _BACKUP_OUT)
5 Backup modem (for P7300 only-see result in _BACKUP_OUT)
6 Backup /system (tar format-see result in _BACKUP_OUT)
7 Backup /efs (tar and .img format-see result in _BACKUP_OUT)
8 Backup APK from /data/app (tar format-see result in _BACKUP_OUT)
=============================================================================
:::: ADB PUSH ::::
=============================================================================
9 Pushing file to /data ( from _MODDING_FILE to device)
10 Pushing file to /system ( from _MODDING_FILE to device)
11 Flashing recovery ( from _FLASHING_OUT to device)
12 Flashing Kernel ( from _FLASHING_OUT to device)
13 Flashing modem for GT P7300 ( from _FLASHING_OUT to device)
=============================================================================
:::: Setting ::::
=============================================================================
14 Set current working File ( for PUSH and PULL )
15 Install busybox on device (need root)
16 Set ADB mode (if you on recovery mode)
17 Install apk ( from _MODDING_FILE to device)
18 Install batch apk ( from _BATCH_INSTALL to device)
=============================================================================
:::: Reboot Menu ::::
=============================================================================
19 Reboot System
20 Boot Into Recovery
21 Reboot Bootloader
22 Quit

My previous post
inspiration from congox case
when you got a problem with bootlop and you forget make a nandroid backup
only have file from other ROM with flashable.zip and need to push the file from your computer to device
you have a recovery support with mount /system and mount /data (tested on CWM 5.5.0.4 and overcome CWM 5.1.2.6) and you can enter this menu while bootloop happen..
STEP 1 : MANUAL
Connect your device with computer
From device, Go to recovery - mounts and storage - mount /system and mount /data
From your computer go to adb terminal and type this
Code:
adb shell "ls /data/media/"
If you can see list of file from your device sdcard, so you make adb work for your device ..
Place your zip file on your path, says on C://backup.zip and you want to copy the file to /sdcard/download/ and type this code
Code:
adb push backup.zip /data/media/download/.
wait for copying progress done..
After you done with moving file to device sdcard, check content of your sdcard with this code
Code:
adb shell "ls /data/media/download/"
When you found your file from list, you can flash backup.zip from recovery
STEP 2 : WINDOWS BATCH FILE
I made a simple Batch File for windows (sorry i dont have MAC or LINUX distro) , this file will make a folder with name "emergency" in SDCARD and with your files inside that.
Extract the FLASHER.rar somewhere on your Local folder,example: on your " Desktop" Folder
in folder "FLASHER" you will find runme.bat and folder "files"
Rename your file ((flashable.zip files you want to send through ADB) to "backup.zip" and then Put your file into this path /FLASHER/files/myfiles/ (just replace the existing "backup.zip" with files from yours)
Connect your tab with Computer
Reboot into Recovery Menu from your device
From menu Mounts and Storage choose mount /system and /data
From your Computer go To Folder flasher and klik runme.bat
Follow the instruction on window untill copying process done and device reboot to recovery again (copying process will take a minutes depend on your file size)
Now you can flash a emergency ROM from recovery
Window instruction
Code:
-----------------------------------------------------------------------------
ADB EMERGENCY COPYING TOOL for TAB 8,9
created by SUWANDIAPR
-----------------------------------------------------------------------------
[*] This script will:
(1) COPY YOUR FILE FROM COMPUTER TO SDCARD/emergency/*
(2) CHECKING YOUR CONNECTED DEVICE DIRECTORY
[*] Before u begin:
(1) make sure u have installed adb drivers for ur device
(2) make sure u have installed CWM 5.5.0.4 ON YOUR DEVICE
(3) connect USB cable to PHONE and then connect to PC
(4) Rename your Flashable .zip file with "backup.zip"
and place inside "myfiles" folder on your Computer
(5) from Recovery Menu, Choose "Mounts and storage" then
-mount /system and -mount /data
(6) CONNECT YOUR TAB WITH PC WHILE ON RECOVERY MENU
---------------------------------------------------------------
CONFIRM ALL ABOVE
Sorry for my Bad english, if there is somebody want to correct every words i use , im very welcome and will change with the proper words and sentence..
Hope this help someone..

Nice guide, thanks!!

I needed some help with mounting the system using adb through a batch file.
I use this command
adb -d shell mount -o remount rw /system
But the mounting fails (I have a rooted phone )
pleas help me I know this is off topic

2 possible reasons for this command to fail:
- /default.prop (on the phone) contains the following line: "ro.secure=1". Then you need another boot.img (in fact just a modified ramdisk). look for "unpack-bootimg.pl" or "unpackbootimage" you may find a guide how to do this manually (not too easy). A rooted kernel would also do the trick.
you can check your default prob with this command "adb shell cat /default.prop".
- in some cases mount requires more parameters. try "adb shell mount" and look for the line containing "/system". In front of system is the "device-name". in my case the mount command would look like this:
mount -o remount,rw /block/dev/mmcblk0p24 /system
hope this helps and sorry for answering off-topic questions....

nail16 said:
I needed some help with mounting the system using adb through a batch file.
I use this command
adb -d shell mount -o remount rw /system
But the mounting fails (I have a rooted phone )
pleas help me I know this is off topic
Click to expand...
Click to collapse
you can use busybox and call the binary from the shell
i assume that your device in normal mode ( in home screen)..
here some example..
Code:
su
adb push busybox /tmp/.
adb shell "chmod 755 /tmp/busybox"
adb shell "tmp/busybox mount -o remount,rw /system"
after you type "su" superuser will prompt a request, choose "allow".
glitschi667 said:
2 possible reasons for this command to fail:
- /default.prop (on the phone) contains the following line: "ro.secure=1". Then you need another boot.img (in fact just a modified ramdisk). look for "unpack-bootimg.pl" or "unpackbootimage" you may find a guide how to do this manually (not too easy). A rooted kernel would also do the trick.
you can check your default prob with this command "adb shell cat /default.prop".
- in some cases mount requires more parameters. try "adb shell mount" and look for the line containing "/system". In front of system is the "device-name". in my case the mount command would look like this:
mount -o remount,rw /block/dev/mmcblk0p24 /system
hope this helps and sorry for answering off-topic questions....
Click to expand...
Click to collapse
yes you right glistchi, samsung lock adb root on new firmware on my SG- Note..
And make me flash an older firmware for rooting..

new update

Never mind, got it to work

i want to push same file in data system (/data/data) but my tab is not root. can i??

if from cwm recovery, yes you can.. if from stand by mode (home screen) the answer is no... you need root to make it happen..

i got this error
please help

Related

E:Can't read MISC: (No space left on device)

Please help me, my boot show error:
E:Can't read MISC: (No space left on device)
Click to expand...
Click to collapse
Do you have custom recovery? if yes, boot in recovery and access the phone via adb shell and check disk space with df. you will see the percentage of how much disk space is in use. if it is system, try to delete the boot sounds and some ringtones. if its data, delete the contents of /data/local/tmp (i suppose there are many apks there which aren't in use at all).
Hope this helps
55% /system
19% /data
18% /cache
25% /sdcard
how to clear width shell
babyskill said:
Please help me, my boot show error:
Click to expand...
Click to collapse
I have same problem and no one help me
hi
I have same problem... i was try this:
1. Install RUU-2.73.405.5 exe can be from HTC website(You need GoldCard)
link: ftp://xda:[email protected]/Hero...ed_NoDriver.exe
2. Install Instant Root
3. Install Recovery Flasher
4. Install Recovery-RA-hero-v1.6.2.img
5. Reboot in recovery mode - if You have error: Can't read MISC(No space left on device) go forward:
6. Copy misc.img and recovery-RA-hero-v1.6.2.img to your SDCard
misc.img is here: http://content.modaco.net/dropzone/nandroi...6.405.6_WWE.zip
7. adb shell
8. su
9. mount /sdcard
10. cat /dev/zero > /dev/block/mtdblock0
11. dd if=/sdcard/misc.img of=/dev/block/mtdblock0
12. flash_image recovery /sdcard/recovery-RA-hero-v1.6.2.img
13. reboot recovery
but isn't help me..
I hope U will be more lucky
Htc hero cant misc error recovery mode
How to bootloader mode or fastboot mode ?

Downgrade HELP

Hi,
I've a big problem, my friend upgrade his SGS to the official 2.2 BUJP8, i try to use adb reboot recovery to flash the bootloader, to unlock 3button combo, but it doesn't go into. It reboot.
I've intall kies, close all processus, use latest busybox from Titanium backup, USB debuging on, and use the default Home (touchwiz).
But no way it doesn't work.
Naturally recovery doesn't work (unable to flash unsigned zip). I try to use clockwork recovery from rom manager but it seems to be unsigned too. So i don't know what i should do.
#
# Edit
#
Copying a file using the Root Explorer
# unzip and put archive contents in a folder called recovery2e on /sdcard/
# first mount -o remount,rw /system (important options in Root Explorer for do this)
# file recovery copy to /system/bin (and replace)
# xbi folder contents copy to /system/xbin/ (and replace)
Click to expand...
Click to collapse
But doesn't work,
So i try with the cable method
Method by captive thanks buddy
# put archive contents in a folder called recovery2e on /sdcard/
# open a shell and get root (ADB or Terminal on Phone, type su and pres enter / accept )
# remount /system rw (busybox mount -o remount,rw /system)
# rename recovery in /system/bin to recovery3e (for backup purposes)
# copy "recovery" from /sdcard/recovery2e/ to /system/bin/ (cp /sdcard/recovery2e/recovery /system/bin/)
# copy the folder /sdcard/recovery2e/xbin/recovery to /system/xbin/ (cp -rr /sdcard/recovery2e/xbin/recovery /system/xbin/)
# enjoy!
Click to expand...
Click to collapse
But adb doesn't want to remount /sytem
Remount failed: No such file or directory
Drivers are installed, and when adb devices it show my phone, it is in usb debuging.
I'm lost...
I also try Kies Hack, but <CTRL left>+<ALT left>+U+P doesn't work it show no popup of TEST MODE..
HELP plz
Thanksss
I try to use the recovery hack
Pleaaaase i need HELP!
^^
Thanks a lot!
No one can help me?
Snif
Flash with Odin .
jje

[Q] (MiRaGe-KANG build dual boot) How do I set the emmc OS to see uSD p6?

B&N is flashing the emmc 1.4.1 system build for me tomorrow,
when that is done, I need to tell that OS when its booted,
it should find /sdcard (the standard fat32 external storage
filesystem) on the last hardware partition on the uSD card
(which I think is p6?).
I wondered if I can mount from either of the 2 OSes on the card,
the emmc /system partition (say via root explorer or a terminal
emulator or adb shell) to edit its /system/etc/vold.fstab to point
to the correct partition?
Is there a defined way to edit the emmc system from a sdcard
based system, or do I have to root the emmc OS to edit it?
Can I 'adb pull' the file, edit it on windows and 'adb push'
it back to /system, (or does it require rooting to turn on 'usb
debugging' to enable adb)?
I already expanded the the last partition with EASYUS to fill the card.
fuzzynco said:
B&N is flashing the emmc 1.4.1 system build for me tomorrow,
when that is done, I need to tell that OS when its booted,
it should find /sdcard (the standard fat32 external storage
filesystem) on the last hardware partition on the uSD card
(which I think is p6?).
I wondered if I can mount from either of the 2 OSes on the card,
the emmc /system partition (say via root explorer or a terminal
emulator or adb shell) to edit its /system/etc/vold.fstab to point
to the correct partition?
Is there a defined way to edit the emmc system from a sdcard
based system, or do I have to root the emmc OS to edit it?
Can I 'adb pull' the file, edit it on windows and 'adb push'
it back to /system, (or does it require rooting to turn on 'usb
debugging' to enable adb)?
I already expanded the the last partition with EASYUS to fill the card.
Click to expand...
Click to collapse
Yeah, quite simple.
From your CM7 rom.
-Use root explorer and browse to /mnt.
-In the /mnt folder create a folder called /nsystem
-Now open up terminal emulator and perform the following commands
Code:
$ su
# mount /dev/block/mmcblk0p5 /mnt/nsystem
-Now go back to root explorer and browse to /mnt/nsystem/etc
-I think you have to mount it as r/w and then long press on vold.fstab
-Edit the sdcard mount from "auto" to "7", not 6. It has to be "7"
-Save it and make sure you exit out of root explorer. Not just pushing the home button, but choosing exit from the menu
-Go back to terminal and it should bring you back to where you left off and type in the following commands
Code:
# umount /mnt/nsystem
# exit
$
-Now you can reboot to the stock rom and it should be able to share the same sdcard partition as your dualbootsd
Racks
racks11479 said:
Yeah, quite simple.
From your CM7 rom.
-Use root explorer and browse to /mnt.
-In the /mnt folder create a folder called /nsystem
-Now open up terminal emulator and perform the following commands
Code:
$ su
# mount /dev/block/mmcblk0p5 /mnt/nsystem
-Now go back to root explorer and browse to /mnt/nsystem/etc
-I think you have to mount it as r/w and then long press on vold.fstab
-Edit the sdcard mount from "auto" to "7", not 6. It has to be "7"
-Save it and make sure you exit out of root explorer. Not just pushing the home button, but choosing exit from the menu
-Go back to terminal and it should bring you back to where you left off and type in the following commands
Code:
# umount /mnt/nsystem
# exit
$
-Now you can reboot to the stock rom and it should be able to share the same sdcard partition as your dualbootsd
Racks
Click to expand...
Click to collapse
That's exactly what I needed.
Is holding the hard key (N) supposed
to display a menu? The effects I saw were
normal boot (CM7), both volume keys (CM9)
and N key CWM Recovery.
B&N decided they have to replace the device, (store tech said
TPTB required them to stop using the repartitionin uSD cards they
were using). Since they can't reflash, they agreed to send a .replacement)

How can i copy Rom zip to phone, i formatted, no rom to flash but i have recovery

I deleted Rom file in sdcard. I cant flash a rom. I have recovery, root and Philz Touch.
How can i copy Rom zip file from computer to Phone? Any idea. I have rooted KK, i dont want to do all things again.
How to: Copy ROM zip file to the freshly wiped device
I found and share with you, it worked.
Have you ever been in a situation where you mistakenly (or not) wiped the content of the internal storage (including system partition and virtual SD card) on your phone or tablet and unfortunately it doesn't support external storage? Now you can't flash desired custom ROM because you removed it and the device can't be booted due to wiped system partition. Don't worry - it's very easy to fix!
Here are the steps you need to follow to copy the correct rom.zip package to your internal storage:
Download this mini-sdk package and extract it to c:\mini-sdk
Rename the custom ROM package you want to flash to "rom.zip" and copy it to c:\mini-sdk
Connect your device to the PC
Boot your device in recovery mode
Open a command prompt on the PC (cmd.exe), type and confirm each command with ENTER:
cd /d c:\mini-sdk
adb shell
mount /data (error might mean that /data partition is already mounted)
on Android 4.2 and above: mkdir -p /data/media/0
on Android 4.1.2 and below: mkdir -p /data/media
exit
on Android 4.2 and above: adb push rom.zip /data/media/0
on Android 4.1.2 and below: adb push rom.zip /data/media
Wait for a few minutes until the file is copied. It will looks like command shell is not responding, but that means it's still copying. Wait patiently until you'll see blinking cursor again.
Depends on your custom recovery, use the navigation keys to flash the custom rom.zip package in a typical way you used to flash custom ROMs. It should be on your internal storage now. Done! http://android-revolution-hd.blogspot.com.tr/2013/12/how-to-copy-rom-zip.html
easier solution:
*bring device in recovery mode
*open cmd, go to adb.exe
*type adb.exe push *filename.zip* /sdcard/your path **/sdcard is already linked to /data/media/0
*wait after pushing the file, reboot recovery again
*choose file and flash
*** other method ***
*use the sideload function in recovery
*adb.exe sideload *rom.zip* in cmd
it says usb device descriptor failed...is it due to bad cable??
it says usb device descriptor failed...is it due to bad cable??

Make ROOT Permanet / System Read and Write to all Android ROMS for Tenderloin

Extracting ramdisk image to change fstab.tenderloin to make system read and write allowing permanent root access using any ROM ever created for the HP Touchpad.
I am using Ubuntu 18.04.1 LTS 64-bit (All the software is open source and free, you can get the packages necessary for your distro)
Create a folder in /home (root) name it hpboot ( on the PC ) all work is done on the PC.
Open the custom ROM zip file and extract boot.img to the created directory hpboot
Open Terminal in the hpboot directory, all the commands needs to be enter there.
Text beginning with –>># are for information only. Do not paste into the Linux terminal window.
–>># The following will extract images from boot.img file located in the hpboot direcory.
–>># Copy and paste each individual line in the Terminal window one by one and wait until each command finish processing.
dumpimage -i boot.img kernel.uImage
dumpimage -i boot.img -p 1 ram
dd if=ram of=ramdisk.img.gz bs=64 skip=1
gunzip ramdisk.img.gz
mkdir ramdisk; cd ramdisk
cpio -i < ../ramdisk.img
–>>#The ramdisk files are uncompress in the hpboot/ramdisk directory
–>>#Open file fstab.tenderloin using (text editor) change mnt_flags of/system ext4 from ro to rw
–>>#Look like this when change from (ro ) read only to ( rw ) read and write.
–>>#<src> <mnt_point> <type> <mnt_flags and options>
–>>#/dev/store/cm-system /system ext4 rw,errors=panic
–>># Save and close the fstab.tenderloin file
–>># The next 3 steps will repack the files into the ramdisk and merge Kernel to create the finish boot image.
find . | cpio --create --format=’newc’ | gzip > ../ramdiskRW.img
cd ~/hpboot
mkimage -A arm -O linux -T ramdisk -C none -a 0x00000000 -n “TENDERLOIN RW SYSTEM RAMDISK” -d ./ramdiskRW.img ./ramdisk.uImage
mkimage -A arm -T multi -C none -n “Tenderloin RW System” -d kernel.uImage:ramdisk.uImage uImage.Android_RW
–>>#Boot the touchpad into TWRP, connect to PC, copy uImage.Android_RW to the external Micro SDCard.
–>>#Select MOUNT and touch Boot, go back, touch Advanced, File Manager, touch external_sd, select uImage.Android_RW, touch Copy File, touch boot, touch select Current Folder.
–>>#You should have free space on your boot for both images. At the boot screen you will have the option of Android (with no permanet ROOT access) and Android_RW (RW System), you need to install SuperSu. You can use any of the two options or delete uImage.Android and then rename uImage.Android_RW to uImage.Android for one boot option.
You do not need to re flash the ROM, you can add this boot file and use it with your current installed working ROM.
The process works for all boot.img created for the HP Touchpad. If you have a ROM and would like to have system read and write access then you can do this.
Hopefully a Linux Guru will create a script for this, which will automate the process to 3 seconds!
I like tinkering with my TP but I am running @Windows 7 on a 32 bit.. any suggestions?
Android is base on Linux OS.
Install vmware player and run ubuntu as a virtual machine, both are free.
--SNIP--
Hopefully a Linux Guru will create a script for this, which will automate the process to 3 seconds!
Click to expand...
Click to collapse
Here's a shell script that automates the process (rename the extension from .txt to .sh). Put the script and boot image file in any directory and type
Code:
./rwcreate.sh
If it doesn't execute, it probably needs its permissions changed.. Right click the file you created, select 'properties'. In the properties window, select "Permissions" and check "allow executing as ..." or type
Code:
chmod +x rwcreate.sh
in a terminal window
Thanks for your help and dedicating your time to make it easier for others.
I made suggestion to the script on correcting an error, on DU forum.
Now is just a click to get it done, but if we were in a perfect computer world, it could be even easier as to connect the HP Touchpad to PC using USB.
Then run the script and everything is complete!
Using adb pull command to get (boot.uImage) from hp boot directory, to PC.
Changes are done as per script.
adb push command new boot.uImage to hp boot directory, all done!
But making it easier, will make it more complicated and having to install more software and confusing!
HP_TOUCHPAD said:
Thanks for your help and dedicating your time to make it easier for others.
I made suggestion to the script on correcting an error, on DU forum.
Now is just a click to get it done, but if we were in a perfect computer world, it could be even easier as to connect the HP Touchpad to PC using USB.
Then run the script and everything is complete!
Using adb pull command to get (boot.uImage) from hp boot directory, to PC.
Changes are done as per script.
adb push command new boot.uImage to hp boot directory, all done!
But making it easier, will make it more complicated and having to install more software and confusing!
Click to expand...
Click to collapse
Done. Thanks.
shumash said:
Done. Thanks.
Click to expand...
Click to collapse
The script on this forum is correct, but in the DU the file was wrong, corrected now.
Thanks for the fix and help!

Categories

Resources