{Tutorial}Push APK files using ADB - Galaxy Y GT-S5360 General

Here's what you need to know to start on this adventure:Knowledge of: Android SDK, command prompt, adb push (command), adb pull (command), setting permissions in adb shell (chmod), apktool (compiling/decompiling), 7zip, Notepad++ or equivalent.
Pushing the file to our phone
Here I am taking SystemUI.apk as an example.
Plug in your phone to your computer.
Open command prompt, and change directories to your Android SDK - platform-tools directory(mine is at: C:\sdk\platform-tools).]
Type: adb reboot recovery
On your phone, mount /system. If you don't, you won't be able to access/make changes to /system.
Type: adb shell
Type:cd /system/app
Type:mv SystemUI.apk SystemUI.bak
NOTE: This copies your existing phone's SystemUI.apk to a file named SystemUI.bak. We are backing up our file, I HIGHLY RECOMMEND THIS.
Type: exit
Type:adb push SystemUI.apk /system/app/
Type:adb shell
Type: chmod 0644 /system/app/SystemUI.apk
Type:exit
Click to expand...
Click to collapse
Now, reboot your phone normally.
Now, if you screwed up and you need to revert back to your original SystemUI.apk before we pushed the new one, here's how:
Type: adb reboot recovery
On your phone, mount /system.
Type: adb shell
Type: cd /system/app/
Type: rm SystemUI.apk
NOTE: This deletes your newly pushed SystemUI.apk file.
Type: mv SystemUI.bak SystemUI.apk
Type: exit
Reboot your phone normally. Notice we did not do the permissions chmod command again. Why not? We don't have to since copying the file retains its permissions. We only need to do this when pushing a new file to the system.
Click to expand...
Click to collapse
Press thanks.!!! if i've helped..!!​

True $tar said:
Here's what you need to know to start on this adventure:
Click to expand...
Click to collapse
There's already a guide available with a complete list of adb commands.See here
Use the power of search button before making new threads !

Mod Edit
As has been suggested , there is already a thread on this subject.
Thread closed
malybru
Forum Moderator

Related

[GUIDE] How to Root the Motorola Xoom

Article found on BriefMobile!
1. Download the Motorola Xoom Root Zip file and unzip it. Download
2. Place the files in the SDK Tools folder.
3. adb reboot bootloader (You can skip the next 3 steps if you’ve unlocked with fastboot previously)
5. fastboot oem unlock (wait for reboot)
6. adb reboot bootloader
7. fastboot flash boot rootboot.img
7. fastboot reboot (wait for reboot)
8. adb remount
9. adb shell push su /system/bin
10. adb shell ln –s /system/bin/su /system/xbin/su
11. adb shell chmod 4755 /system/bin/su
12. adb push Superuser.apk /system/app
Thanks for the hard work Koush! His website
Awesome. Let's get a boot image to make roms
Sent from my DROIDX using Tapatalk
Are we gonna be able to undo this when we send them back for the upgrade?
Ok I have rooted a few times via ADB and have no idea what steps 5-7 mean. What does fastboot oem unlock mean? And what does number 7 mean,,,in english for us dummys please LOL
5. fastboot oem unlock (wait for reboot)
6. adb reboot bootloader
7. fastboot flash boot rootboot.img
7. fastboot reboot (wait for reboot)
camblue said:
Ok I have rooted a few times via ADB and have no idea what steps 5-7 mean. What does fastboot oem unlock mean? And what does number 7 mean,,,in english for us dummys please LOL
5. fastboot oem unlock (wait for reboot)
6. adb reboot bootloader
7. fastboot flash boot rootboot.img
7. fastboot reboot (wait for reboot)
Click to expand...
Click to collapse
You have to type those commands in your adb command window.
yes, fastboot is a tool included with the android sdk just like adb
it has somewhat different functions though
smaskell said:
yes, fastboot is a tool included with the android sdk just like adb
it has somewhat different functions though
Click to expand...
Click to collapse
Ok so question,,,, i downloaded the files, should i take them out of the xoomroot folder and place in the sdk tools folder or the folder itself?
also do i unzip the rootboot zip?
camblue said:
Ok so question,,,, i downloaded the files, should i take them out of the xoomroot folder and place in the sdk tools folder or the folder itself?
also do i unzip the rootboot zip?
Click to expand...
Click to collapse
put those files with the sdk tools. rootboot shows a disc image to me. i would leave that alone
socomdark said:
put those files with the sdk tools.
Click to expand...
Click to collapse
Ok i dont mean to be difficult but does that mean take them out of the xoomroot folder and place all three of them individually into the sdk tools folder? thank you!
everytime i try
adb shell ln –s /system/bin/su /system/xbin/su
i always get a link failed no such file or directory but i just pushed su to the system/bin folder... any ideas on whats going on?
http://www.koushikdutta.com/2011/02/motorola-xoom-rooted.html
It's from Koush!
Update: I dont think that the command shell should be in step 12?
2 things. Fastboot was not included in my fresh download of the 3.0 SDK tools.
I grabbed it here:
http://developer.htc.com/adp.html#s2
And second, with the newest Android 3.0 SDK, at step 12, pushing the su file, I recieve:
push: not found
If I go into adb-shell and type "push" I recieve the same error?
I got the moto dev drivers & 3.0 sdk and can do push / pull.
lasphyxial said:
everytime i try
adb shell ln –s /system/bin/su /system/xbin/su
i always get a link failed no such file or directory but i just pushed su to the system/bin folder... any ideas on whats going on?
Click to expand...
Click to collapse
On same step...even looked and su is in the first folder.
camblue said:
Ok i dont mean to be difficult but does that mean take them out of the xoomroot folder and place all three of them individually into the sdk tools folder? thank you!
Click to expand...
Click to collapse
oh sorry, yes take them out of xoom root folder and into sdk tools individually.
koush made a mistake on one of the instructions and had fix it so the op wont be entirely accurate. use instructions from koush's site
This is what i did, and i just deleted the 2 games that come with the tablet.
1. # Download the XOOM root zip.
2. # Unzip the package.
3. # Put your junk in the box.
4. adb reboot bootloader (skip the next 3 steps if you have already unlocked via fastboot)
5. fastboot oem unlock
6. # wait for reboot
7. adb reboot bootloader
8. fastboot flash boot rootboot.img
9. fastboot reboot
10. # wait for reboot
11. adb remount
12. adb push su /system/bin
13. adb shell ln –s /system/bin/su /system/xbin/su <<i didnt do this step, instead i did 13. adb push su /system/xbin
14. adb shell chmod 4755 /system/bin/su
15. adb push Superuser.apk /system/app
Here you go
thank you very much! Has anyone did this with success yet?
camblue said:
thank you very much! Has anyone did this with success yet?
Click to expand...
Click to collapse
I think the real question is once the bootloader is unlocked and system rooted, will unrooting and re-locking the bootloader be detected by motorola when sending it in for the 4glte upgrade???
camblue said:
thank you very much! Has anyone did this with success yet?
Click to expand...
Click to collapse
I did, but i changed one step...look up 2 post.

Google Wallet Help (ADB Shell related)

I'm going through these instructions but they are pretty complicated for me.
lukegb said:
Instructions for getting rid of ZIP version only <4.0.3:
Open ClockworkMod Recovery
Download the correct files from http://googlewallet.lukegb.com/stock/system/ that match your Android build and system - ICL53F is Android 4.0.2, yakju is GSM and mysid is LTE.
You'll need:
NfcGoogle.apk
com.android.nfc_extras.jar
Open an adb shell from your computer to your device from the directory you've just downloaded those files to
Run (on device via adb shell):
Code:
mount /system
mount /data
rm /system/app/Wallet.*
rm /system/app/NfcGoogle.*
rm /system/framework/com.android.nfc_extras.*
exit
Run (on computer):
Code:
adb pull /data/system/packages.xml packages.xml
Make a backup of the newly-created packages.xml file which is on your computer
Open packages.xml in a text editor (which isn't notepad)
Copy ALL the content
Open http://googlewallet.lukegb.com/gn_packages_xml_fixer.html in a web browser
Paste the content into the left-hand "Input" box
Click "Fix it"
Copy ALL the content from the right-hand "Output" box
Delete all the content in the text editor with packages.xml open
Paste the content
Save packages.xml
Close your text editor
Run (on computer):
Code:
adb push NfcGoogle.apk /system/app/NfcGoogle.apk
adb push com.android.nfc_extras.jar /system/framework/com.android.nfc_extras.jar
adb push packages.xml /data/system/packages.xml
adb shell chmod 644 /system/app/NfcGoogle.apk
adb shell chmod 644 /system/framework/com.android.nfc_extras.jar
You're done.
EDIT (28/12/11)
Important notice for all those who have already attempted to remove the ZIP version to replace with the APK version
Read this if NFC has disappeared from your more menu, you get crashes in the More menu, Wallet now forcecloses where it didn't before after removing the ZIP
I have just (idiotically) noticed a blindingly obvious flaw with the files I had previously uploaded to the stock folder on http://googlewallet.lukegb.com - they were the odexed versions of the files, crucially WITHOUT the .odex files. I've replaced them with pseudo-stock (same signatures) versions of the apks and if you replace the NfcGoogle.apk, Android should correctly take this into account.
Don't forget to chmod 644 the NfcGoogle apk and the com.android.nfc_extras.jar files!
Click to expand...
Click to collapse
I'm stumped here: Open an adb shell from your computer to your device from the directory you've just downloaded those files to
I can open cmd and open adb shell but i don't understand how to open adb from the directory where i donwloaded said files.

build.prop problem

I've been trying to edit my build.prop file for the past couple days and anytime I do anything at all to my build.prop file, my phone boots up with a black screen. I have no idea what I'm doing wrong.
1 method I've tried:
Code:
adb reboot recovery
adb shell mount /system or adb shell and then mount /system
adb pull /system/build.prop
I modify the line:
ro.sf.lcd_density=320 to be ro.sf.lcd_density=240
Code:
adb push build.prop /system/
Then I reboot and I get a blank screen after the Google logo.
Makes sure permissions to build.prop are correctly set after you push it to /system/. The permission should be 644. Simply run,
Code:
adb shell
chmod 644 /system/build.prop
after you've pushed the modified file over.
firefox360 said:
Makes sure permissions to build.prop are correctly set after you push it to /system/. The permission should be 644. Simply run,
Code:
adb shell
chmod 644 /system/build.prop
after you've pushed the modified file over.
Click to expand...
Click to collapse
Thank you very much. Seems it was just a permissions issue.

[Q] lost etc/hosts file

hello everyone
I have a t-mobile note 2 rooted and i was having problems with my play store and deleted my hosts file by mistake i tried making a new one with root explorer but it fails is there anything els that i can do to get it back when i reset my phone the play store is gone and i don't know what to do any help would be great.
Bdvs said:
hello everyone
I have a t-mobile note 2 rooted and i was having problems with my play store and deleted my hosts file by mistake i tried making a new one with root explorer but it fails is there anything els that i can do to get it back when i reset my phone the play store is gone and i don't know what to do any help would be great.
Click to expand...
Click to collapse
Do you have access to a system with adb or heimdall ?
If not
You can create a new file(text) named hosts under /etc/system/ with the following line
127.0.0.0 localhost
You can set the permissions of this file to 0644 via root explorer or using Terminal Emulator:
----
cd /system/etc
chmod 644 hosts
---
Never used root explorer but there has to be a GUI option somewhere in it.
You will have to mount the /system to read-write mode in root explorer in order to make any changes.
Once you have created the file, reboot the phone and see if it works, if not then manually delete all files under /system/data/dalvick-cache.
Be careful before deleting any file, make sure you browse to /system/data/-dalvick-cache directory and select all files and then delete them.
ciphercodes said:
Do you have access to a system with adb or heimdall ?
If not
You can create a new file(text) named hosts under /etc/system/ with the following line
127.0.0.0 localhost
You can set the permissions of this file to 0644 via root explorer or using Terminal Emulator:
----
cd /system/etc
chmod 644 hosts
---
Never used root explorer but there has to be a GUI option somewhere in it.
You will have to mount the /system to read-write mode in root explorer in order to make any changes.
Once you have created the file, reboot the phone and see if it works, if not then manually delete all files under /system/data/dalvick-cache.
Be careful before deleting any file, make sure you browse to /system/data/-dalvick-cache directory and select all files and then delete them.
Click to expand...
Click to collapse
I have adb access how would i do it with adb
root explorer wont let me make a text file
Bdvs said:
I have adb access how would i do it with adb
root explorer wont let me make a text file
Click to expand...
Click to collapse
1) Using text editor create a text file named "hosts" with the following contents:
---
127.0.0.1 localhost
---
If you are on windows make sure you remove the file extension.
2) Connect phone via USB and open command prompt or shell. Make sure USB Debugging is checked under developers options.
3) Check if adb detects your device by typing: adb devices , you should see your device listed, if not please check if your phone has correct USB drivers.
4) Now push the file you created to your phone with this command : adb push /path/to/file/hosts /sdcard/hosts
example: adb push C:\tmp\hosts /sdcard/hosts
5) Now log in to your phone by typing adb shell
6) Switch to super user by typing: su , grant permissions when asked by SuperSU.
7) Mount system in read-write mode by typing: mount -o remount,rw -t yaffsw /dev/block/mtdblk3 /system
8) Move the hosts file to /system/etc by typing: mv /sdcard/hosts /system/etc
9) Browse to /system/etc by typing: cd /system/etc
10) Change file owner and group by typing: chown root:root hosts
11) Change file permissions by typing: chmod 644 hosts
12) Mount system back to read only by typing: mount -o remount,ro -t yaffsw /dev/block/mtdblk3 /system
13) Delete dalvik cache by browsing to cd /data/dalvik-cache and then type rm -f *.dex
14) type exit two times to exit.
15) Reboot phone and it should work.
I believe there might be an easy way or an apk which does this but I haven't tried it.
play store
ciphercodes said:
1) Using text editor create a text file named "hosts" with the following contents:
---
127.0.0.1 localhost
---
If you are on windows make sure you remove the file extension.
2) Connect phone via USB and open command prompt or shell. Make sure USB Debugging is checked under developers options.
3) Check if adb detects your device by typing: adb devices , you should see your device listed, if not please check if your phone has correct USB drivers.
4) Now push the file you created to your phone with this command : adb push /path/to/file/hosts /sdcard/hosts
example: adb push C:\tmp\hosts /sdcard/hosts
5) Now log in to your phone by typing adb shell
6) Switch to super user by typing: su , grant permissions when asked by SuperSU.
7) Mount system in read-write mode by typing: mount -o remount,rw -t yaffsw /dev/block/mtdblk3 /system
8) Move the hosts file to /system/etc by typing: mv /sdcard/hosts /system/etc
9) Browse to /system/etc by typing: cd /system/etc
10) Change file owner and group by typing: chown root:root hosts
11) Change file permissions by typing: chmod 644 hosts
12) Mount system back to read only by typing: mount -o remount,ro -t yaffsw /dev/block/mtdblk3 /system
13) Delete dalvik cache by browsing to cd /data/dalvik-cache and then type rm -f *.dex
14) type exit two times to exit.
15) Reboot phone and it should work.
I believe there might be an easy way or an apk which does this but I haven't tried it.
Click to expand...
Click to collapse
Thanks for all your help i got the hosts file in to system/etc folder but my play store is still not working i get a pop up that play store has stop working so i cleared cache for play store, play services and google framework and its still not working
any ideas thanks again
Did you delete dalvik cache ?
Sent from my SGH-T889 using xda app-developers app

HELP!!!! Cannot update FTV manually

Tried these steps
Connect to your Fire TV using ADB
(If you don’t know how, follow up to Step 4 Part 2 in our Windows or Mac guide)
Run the command: adb shell
Run the command: su
(If this is the first time you’ve ever run su, a pop-up will appear on the Fire TV, select Grant)
Run the command: chmod 777 /cache
Run the command: chmod 777 /cache/recovery
Run the command: cd /cache/recovery
Run the command: echo “--update_package=/cache/update.zip” > command
Run the command: exit
Run the command (yes, again): exit
Run the command: adb push update.zip /cache
(This assumes the update.zip file you renamed in step 2 is in the same directory as adb, otherwise enter the full path to the file like adb push C:\full\path\to\update.zip /cache)
Once the update.zip file has finished transferring to the Fire TV, run the command: adb reboot recovery
The update.zip file is on the same folder where the adb platform-tools is located, but when I enter the full path it says no such file or directory.
Mine looks like this C:\Users\XXX\platform-tools>adb push update.zip /cache
What am I doing wrong, please help
CD to the directory first . then enter adb push update.zip /cache
mastafunk said:
CD to the directory first . then enter adb push update.zip /cache
Click to expand...
Click to collapse
I did everything in the same folder.
Do you suggests I go back to root of c folder then go back to the folder again
Copy and paste what you entered and the error..
[url]https://www.dropbox.com/s/rdr3buikslvw1qm/adb.png[/URL]
https://www.dropbox.com/s/rdr3buikslvw1qm/adb.png
Stevie G said:
[url]https://www.dropbox.com/s/rdr3buikslvw1qm/adb.png[/URL]
https://www.dropbox.com/s/rdr3buikslvw1qm/adb.png
Click to expand...
Click to collapse
when you push a file with adb, the file must be in the same folder/path you're running the adb command from. From your example, you need update.zip on your PC at C:\users\Stevie G\platform-tools\
The error is saying the file isn't at that path.
Luxferro said:
when you push a file with adb, the file must be in the same folder/path you're running the adb command from. From your example, you need update.zip on your PC at C:\users\Stevie G\platform-tools\
The error is saying the file isn't at that path.
Click to expand...
Click to collapse
might have issues with the space in Stevie G, try a folder without spaces.

Categories

Resources