Related
Hi,
i have recently bought an HTC desire Z (G2) device, and downloaded a 163MB .zip rom. what do i have to do to install it??
i searched every where and could not find an answer!!
thanks
Look here:
http://forum.xda-developers.com/showthread.php?t=801206
You shall find all answers to your questions there
Razorless said:
Look here:
http://forum.xda-developers.com/showthread.php?t=801206
You shall find all answers to your questions there
Click to expand...
Click to collapse
Flash the ROM via recovery. I realize that's vague but you need clockworkmod recovery and to do that you need to have s-off. And to get s-off is a whole new thing all together because you need perm root
To root it, s-off it and rom flash it, you have to be willing to accept the consequences if you don't read enough and if you make a mistake!
And, that's the key, read everything and keep reading until it makes sense to you. Then follow the instructions to the "T" make sure you know your builds and then it's a leap off faith.......if you don't understand something, ask a question or two. There is all the info that you need right in the threads. Good luck and don't be in a hurry . Happy New Year.
thanks all, i really appreciate your fast response.
actually i just want to enable arabic support on my htc desire z, and i downloaded the arabic files from
http://ardoid.com/?p=189
and installed visionary and done the perm root with su permissions and get a # after typing su in terminal
i copied the zip files to the sd, rebooted and selected recovery, then applied update.zip, the phone rebooted but without any success of arabizing.
my kernel is 2.6.32.21-gd2764ed older according to wiki
http://forum.xda-developers.com/wik...Subsidy_Unlock.2C_SuperCID.2C_and_Radio_S-OFF
my question is, do i need to s off to get the files installed? do i have to remove visionary as a second step with removing rooting?
the status is that my phone has permaroot, and what i understood is that i am a step away from s off using gfree, i downloaded the file to my mac, and copied to the sd card.
i have super user
su
#
i have understood adb, and terminal, and copied the script but resulted with errors, script used
cd /data/local
chmod 777 gfree
./gfree
sync
error result on phone after chmod 777 gfree
unable to chmod gfree:no such file or directory
#
i have copied gfree.zip to sd card via mounting the phone via usb. and then changed the mode to charging mode automatically and enabled usb debugging.
again, i would appreciate your efforts, since this thread is closed;
http://forum.xda-developers.com/showthread.php?t=857390&page=15
Microzift said:
i have understood adb, and terminal, and copied the script but resulted with errors, script used
Click to expand...
Click to collapse
The error you are receiving means you don't actually have gfree on your phone (at least not in the right location). Did you receive any errors from ADB when you pushed the gfree file? Also, be sure you pushed the actual gfree file and not the zip (you need to extract it from the zip first).
Microzift said:
i have copied gfree.zip to sd card via mounting the phone via usb. and then changed the mode to charging mode automatically and enabled usb debugging.
Click to expand...
Click to collapse
Are you saying you tried this as well? Or did you not actually use ADB? If you are trying to accomplish this without ADB, you might want to take a look at this thread for instructions: http://forum.xda-developers.com/showthread.php?t=903152. And again, you will need to use the contents of the zip file, not the zip itself.
ianmcquinn said:
The error you are receiving means you don't actually have gfree on your phone (at least not in the right location). Did you receive any errors from ADB when you pushed the gfree file? Also, be sure you pushed the actual gfree file and not the zip (you need to extract it from the zip first).
Are you saying you tried this as well? Or did you not actually use ADB? If you are trying to accomplish this without ADB, you might want to take a look at this thread for instructions: http://forum.xda-developers.com/showthread.php?t=903152. And again, you will need to use the contents of the zip file, not the zip itself.
Click to expand...
Click to collapse
thanks for your reply, i checked the thread and more questions!
actually i am confused, i do the steps without getting the point of it, i installed astro, visionary 14, terminal emulator on phone, and adb on mac.
i dont know what adb is for, and i kind of understand that its for copying files from sd to phone internal memory? is that right? or does it have other functions,
its also not easy to understand astro, can it copy files from sd to internal memory?
do i have to drag adb to terminal every time for adb to run?
shall i use gfree or gfree_2 on my sd?
does terminal with su be enough or i have to use adb?or copying gfree to sd would be enough via usb mounting? where is data\local?
after my current understanding, i have decided to not use adb, and i have reached this step,after writing this script in the terminal,
got superuser for terminal emulator (ON PHONE)
su
cd /sdcard
chmod 777 the GFREE
./gfree
permission denied!
please let me know if i have misunderstood anything or if i am on the wrong track to s off.
i apologize for the long questions,
thanks again
Microzift said:
i dont know what adb is for, and i kind of understand that its for copying files from sd to phone internal memory? is that right? or does it have other functions,
Click to expand...
Click to collapse
ADB stands for Android Debug Bridge. It allows you to do a number of functions to your phone from your computer. The most common commands are push and pull (copies files on your computer to/from your phone) and shell (starts a shell terminal on your phone---basically the exact same as running the Terminal app on your phone, only you can type all of your commands on your computer instead). It also allows you to do things like install APKs stored on your computer directly to your phone and viewing log files.
Microzift said:
its also not easy to understand astro, can it copy files from sd to internal memory?
Click to expand...
Click to collapse
Astro is simply a file manager for your phone. It allows you to do basic file management (copy, move, delete, create new directories, etc.). Some directories are read-only by default however (rooting the phone will allow you to, among other things, mount these directories as read-write---once rooted, Root Explorer is a popular file manager like Astro that will allow you to manipulate these directories).
Microzift said:
do i have to drag adb to terminal every time for adb to run?
Click to expand...
Click to collapse
No, this is not ADB should be used (it is a command line tool). Check out the various guides on setting up/using ADB.
Microzift said:
shall i use gfree or gfree_2 on my sd?
does terminal with su be enough or i have to use adb?or copying gfree to sd would be enough via usb mounting? where is data\local?
after my current understanding, i have decided to not use adb, and i have reached this step,after writing this script in the terminal,
got superuser for terminal emulator (ON PHONE)
su
cd /sdcard
chmod 777 the GFREE
./gfree
permission denied!
Click to expand...
Click to collapse
See my next post for instructions on rooting without using ADB.
Permanent Root without using ADB
Extract the contents of gfree_temp-root.zip to your SD card (located on the Wiki). Also extract the gfree file from gfree_02.zip to your SD card. Note, you need to extract these files, not simply copy the entire zip to your SD card. Also, if you copied these files to your SD card by mounting your phone over USB, be sure to unmount it again prior to starting the remaining steps (i.e., turn off USB storage). Your SD card should now contain the following files: busybox, gfree, rage, root, su, and Superuser.apk.
Start Terminal on your phone (download from Market if you don't already have one) and type the following commands exactly as shown.
Code:
cp /sdcard/rage /data/local/tmp
cp /sdcard/busybox /data/local/tmp
cp /sdcard/root /data/local/tmp
chmod 755 /data/local/tmp/*
Then run the following command if you need temp root (so not needed if already temp rooted with Visionary). It is recommended that you uninstall or disable Visionary though and use this method however (some people have had problems when using Visionary). If you want to use Visionary for your temp root, skip this step and just right to the permanent root commands further below.
Code:
/data/local/tmp/rage
You should see a message similar to "Forked #### childs." Hit Menu and select Reset Term (the app will close). Launch Terminal again (it may force close). Launch it one more time (you now have temp root).
Now to achieve permanent root, run the following commands:
Code:
cp /sdcard/gfree /data/local
chmod 777 /data/local/gfree
/data/local/gfree -f
sync
Make sure there are no errors from the gfree output.
Lastly, run the following commands (the root script will install Busybox and set up the su apps for you):
Code:
/data/local/tmp/root
sync
If you have no errors, reboot your phone. You should now have permanent root.
ianmcquinn said:
Extract the contents of gfree_temp-root.zip to your SD card (located on the Wiki). Also extract the gfree file from gfree_02.zip to your SD card. Note, you need to extract these files, not simply copy the entire zip to your SD card. Also, if you copied these files to your SD card by mounting your phone over USB, be sure to unmount it again prior to starting the remaining steps (i.e., turn off USB storage). Your SD card should now contain the following files: busybox, gfree, rage, root, su, and Superuser.apk.
Start Terminal on your phone (download from Market if you don't already have one) and type the following commands exactly as shown.
Code:
cp /sdcard/rage /data/local/tmp
cp /sdcard/busybox /data/local/tmp
cp /sdcard/root /data/local/tmp
chmod 755 /data/local/tmp/*
Then run the following command if you need temp root (so not needed if already temp rooted with Visionary). It is recommended that you uninstall or disable Visionary though and use this method however (some people have had problems when using Visionary). If you want to use Visionary for your temp root, skip this step and just right to the permanent root commands further below.
Code:
/data/local/tmp/rage
You should see a message similar to "Forked #### childs." Hit Menu and select Reset Term (the app will close). Launch Terminal again (it may force close). Launch it one more time (you now have temp root).
Now to achieve permanent root, run the following commands:
Code:
cp /sdcard/gfree /data/local
chmod 777 /data/local/gfree
/data/local/gfree -f
sync
Make sure there are no errors from the gfree output.
Lastly, run the following commands (the root script will install Busybox and set up the su apps for you):
Code:
/data/local/tmp/root
sync
If you have no errors, reboot your phone. You should now have permanent root.
Click to expand...
Click to collapse
thanks, i could not find busybox, gfree, rage, root, su, and Superuser.apk on my sd after copying and extracting the zip files, the folders i unzipped did not also have the above files (gfree_temp-root.zip & gfree_02.zip from wiki, i do not have the above busybox etc files) i also kept them in separate folders on sd card; gfree and gfree_verify_v01
i think i have permanent root via visionary, i receive a # after typing su in terminal on phone. so i dont need rage i guess.
and after trying perm root as explained
cp /sdcard/gfree /data/local
i receive
cp: omitting directory '/sdcard/gfree'
where did i go wrong again!
Microzift said:
i think i have permanent root via visionary, i receive a # after typing su in terminal on phone. so i dont need rage i guess.
and after trying perm root as explained
cp /sdcard/gfree /data/local
i receive
cp: omitting directory '/sdcard/gfree'
where did i go wrong again!
Click to expand...
Click to collapse
If "su" is giving you a # prompt after a reboot then you have permanent root, yes.
Possibly a silly question, but you do have an SD card in the phone, right ? And it's mounted on the phone, not on the PC when you're trying these commands ?
steviewevie said:
If "su" is giving you a # prompt after a reboot then you have permanent root, yes.
Possibly a silly question, but you do have an SD card in the phone, right ? And it's mounted on the phone, not on the PC when you're trying these commands ?
Click to expand...
Click to collapse
thanks for asking, and thanks for clarifying the perm root.
regarding the sd, yes i am ok with mounting and charging mode, and i make sure that the phone is always in charge mode when using adb or terminal on the phone automatically when using usb. and only convert to pc mounting mode when i need to copy a file (like gfree or gfree veryfy) to phone sd card.
although i still keep the usb connected to mac in charge mode when i try terminal on phone (and adb is running). i disconnected to try and received the same error.
Microzift said:
thanks for asking, and thanks for clarifying the perm root.
regarding the sd, yes i am ok with mounting and charging mode, and i make sure that the phone is always in charge mode when using adb or terminal on the phone automatically when using usb. and only convert to pc mounting mode when i need to copy a file (like gfree or gfree veryfy) to phone sd card.
although i still keep the usb connected to mac in charge mode when i try terminal on phone (and adb is running). i disconnected to try and received the same error.
Click to expand...
Click to collapse
When you are getting that error with the "cp", try "ls /sdcard" and see if you get a big list of files, which should include whatever you tried to "adb push" there (e.g. gfree).
You don't have to use adb to copy adb to the phone, that's just one way of getting it there. You could mount the SD card from your phone onto your PC and copy it there that way. You just need to get the gfree binary onto your phone somehow, then copy it to /data/local
I just thought - you are running that "cp" command on the phone in Terminal Emulator, right ? Not on your Mac ?
steviewevie said:
When you are getting that error with the "cp", try "ls /sdcard" and see if you get a big list of files, which should include whatever you tried to "adb push" there (e.g. gfree).
You don't have to use adb to copy adb to the phone, that's just one way of getting it there. You could mount the SD card from your phone onto your PC and copy it there that way. You just need to get the gfree binary onto your phone somehow, then copy it to /data/local
I just thought - you are running that "cp" command on the phone in Terminal Emulator, right ? Not on your Mac ?
Click to expand...
Click to collapse
great now i get why i need to mount and copy gfree to phone sd, so that i can copy from sd to internal phone memory using terminal (on phone) or adb on mac.
yes i am running cp on terminal emulator on phone.
after ls /sdcard i receive
/sdcard
#
Microzift said:
thanks, i could not find busybox, gfree, rage, root, su, and Superuser.apk on my sd after copying and extracting the zip files, the folders i unzipped did not also have the above files (gfree_temp-root.zip & gfree_02.zip from wiki, i do not have the above busybox etc files) i also kept them in separate folders on sd card; gfree and gfree_verify_v01
Click to expand...
Click to collapse
Do not keep them in separate folders on the SD card. The files need to be on the root of the SD card in order for the commands I gave you to work.
Microzift said:
great now i get why i need to mount and copy gfree to phone sd, so that i can copy from sd to internal phone memory using terminal (on phone) or adb on mac.
yes i am running cp on terminal emulator on phone.
after ls /sdcard i receive
/sdcard
#
Click to expand...
Click to collapse
That is showing no files in your SD card folder. It sounds like it is actually mounted on your PC when you are running that, rather than being mounted on the phone itself.
steviewevie said:
That is showing no files in your SD card folder. It sounds like it is actually mounted on your PC when you are running that, rather than being mounted on the phone itself.
Click to expand...
Click to collapse
i have disconnected the usb from my pc, and still get the same message.
this is my understanding; mount sd on pc; means i can access the sd as a hard disk via the phones usb cable on my mac desktop.
unmounting; means i gain access of the sd on my phone only?
i found an option on phone, unmount sd card, should i do this every time i use terminal? i think this is for to unplug the sd card from the phone.
how can i get the sd mounted on my phone? i can see the same files via astro on my phone.
i still receive /sdcard
thanks guys, i just rebooted
my desire z is S OFF now.
and installed the recovery
thanks for all of your efforts
I wanted to change my device model, so I copied build.prop from another mobile to my mobile. I am already rooted. But unfortunately I did not change the o.s. from gingerbread to froyo in build.prop ( I have android 2.2 FROYO) When I rebooted, there were many errors. It is now showing no sim card. Mobile network search gives error. Effectively, I can not use the mobile. Terminal emulator, X-plore etc. stopped working. Only Rom toolkit free version works and astro file manager works. Other programs are forcefully closed. Needles to say, I must replace new build.prop with new one.
Using adb I can only pull files but can not write as it is in read only mode.
adb root and adb remount works only if you are in recovery mode ? Y mobile does not have any custom recovery so when I boot in recovery mode it hangs.
Superuser has installed su in system\bin directory. But from adb shell I can use su also. It gives permission denied error. Hence I can not remount the system.
I have read similar threads and found that on some mobiles adb root or adb shell su works but on some not.
I am using Vista 32 bit with admin rights, still can not use root in adb.
Please tell me, how can I mount system read-write. I can not install root explore as google play and even internet is not working.
Please help.
maheshchavan said:
Using adb I can only pull files but can not write as it is in read only mode.
Click to expand...
Click to collapse
activate USB debugging then in console
Code:
adb shell
su
mount -o rw,remount /dev/block/mmcblk0p1 /system
adb push build.prop /system/build.prop
check where is your build.prop
ruscan.calin said:
activate USB debugging then in console
Code:
adb shell
su
mount -o rw,remount /dev/block/mmcblk0p1 /system
adb push build.prop /system/build.prop
check where is your build.prop
Click to expand...
Click to collapse
OMG ruscan.calin i COULD KISS YOU! I had tried to change my OG EVO 4G's buildprop file to another phone so that I could purchase & download an incompatible Google Play app. However after I restarted the phone wouldn't start! It would boot into my rooted HTC EVO 4G Android 2.3.3 and HTC Sense 2.1 but it would get stuck on the wallpaper with just the notification bar at the top and all buttons would be frozen. However I noticed when I plugged in my phone to my computer via usb the computer recognized it. I always keep my phone with USB debugging enabled so I thought I should be good right? I have spent the last 4 hours trying to install and setup adb with no real previous experience with it. I am familiar with dos from years ago and that helped me as it's basic procedure, commands, etc. Then I found out how to install the HTC drivers which I needed and then download the Android SDK with adb that's included which many guides show easily. I started the command prompt (cmd), typed my adb devices command and hurray it showed my phone! I connected and quickly navigated to the build.prop system folder! Luckily when I changed the file I made a bak backup and left it in the same folder. Now the main issue was figuring out how to change the naming of the files which I did via usual adb commands (mv build.prop.bak build.prop). But then to no avail I couldn't get it to write due to it being a system read only folder! Arg! Then I found your post on here, above, and typed it in simply leaving out the adb push portion and replacing that with the mv file command instead and first changing the name of the bad file and then replacing the bak file as the good copy! I exited back to the adb main and unplugged my phone. Moment of truth and man was everything flashing through my head at once! I booted up and YESSSSSSSSSSSSSS, it worked! I went back into root explorer and got rid of the offending leftovers and I've learned my lesson! I just don't want to think about what would have happened if I hadn't found this post. Thank you and if anyone else makes this hug mistake let me know and maybe I can help. Moral of the story don't mess with the build.prop or any system folder unless you know what you're doing! Thanks again!
Quick Guide to Fix Android "build.prop" Issues:
1. Find and download USB drivers for your phone by model or type (HTC EVO 4G's HTC Fastboot drivers): http://downloads.unrevoked.com/HTCDriver3.0.0.007.exe
2. Download and install Android SDK and choose adb: http://developer.android.com/sdk/index.html
Guide: http://htcevohacks.com/htc-evo-hacks/how-to-install-android-sdk-and-adb-drivers-for-htc-evo-4g/
3. Run a command prompt from the "c:/program files/android/android-sdk/platform-tools/" directory. I had to copy the command prompt to get it to open there but sometimes a right-click action will do it. The guide below will help just navigate down to "Using ADB" and skip the rest.
Guide: http://www.howtogeek.com/114667/how...y-default-move-almost-any-app-to-the-sd-card/
4. Once you open the command prompt and you're in the "c:/program files/android/android-sdk/platform-tools/" foler type "adb devices" and your device should appear. If it does move on to next step.
5. Then type adb shell and use the ls command to see directories. Then you'll need to navigate to the system folder by typing "cd system" and then type "ls" to look around in the directory (similar to "dir" in DOS). You should now see the bad build.prop file.
6. You'll need to rename the file or push a correct version. First you need to use the "adb shell" command again and then "su" and finally "mount -o rw,remount /dev/block/mmcblk0p1 /system" to make the directory writable (see ruscan.calin post above for additional info).
Note: I only had to rename my build.prop as I already had my old one in the same system folder. You may have to copy the bad build.prop to your computer, edit it and then push it back to the same system directory. These directions are only for renaming files in the same folder. For the info on how to copy the file to your computer and push it back to your phone go to step *10 below or use the guide below it.
7. I already had the bad build.prop in the system directory with my old one which I had named build.prop.bak. If you have this too simply rename by changing the name first of the bad file to anything by typing "mv build.prop build.prop.bad" or similar.
8. Next rename the build.prop.bak to build.prop by typing "mv build.prop.bak build.prop". Everything should go smoothly and move onto the next step.
9. Finally, If no error messages are found, simply type "adb reboot" or "adb shell reboot" (Depending which version of ADB you have). You should be done, your phone will reboot like normal (working, lol) and everything should be working again! YAY!
*10. To copy the build.prop to your phone type "adb pull /system/build.prop c:\" and the file should be placed in the main c:/ directory on your computer. Navigate to the root (c:/) directory and then right click and "open with" the "build.prop" file using a notepad or other file editor. Then use the text editor (Notepad, etc) to change back what you originally changed to mess everything up. There is tons of stuff on the net to let you know what to fill back in depending on your phone model/type. Or it's possible to get a previous version from an old Nandroid backup or similar. Save the changed text file and make sure its named the same "build.prop" and make sure it's still in the root directory (If you're having issues on this step or just want more insight check out the guides and threads below for more help).
Guide 1: http://androidforums.com/admire-all...p-computer-not-phone-using-root-explorer.html
Guide 2: http://www.modaco.com/topic/328943-quick-guide-to-modifying-buildprop-with-adb/
Guide 3: http://forums.androidcentral.com/sp...-replaced-build-prop-phone-wont-start-up.html
*11. We've already made the directory writable in step 6 so we simply need to push the file back to the phone. If any error message appear re-do step 6 to make writable again. Otherwise push the modified file back to the phone by typing "adb push c:\build.prop /system/". Back to step 9 above! Yay!
If anyone wants to help cleanup this quick guide or make any changes feel free. I just wanted something so that if anyone else has this issue they won't have to worry or search forever to find a solution. OMG it's 2:30AM, to bed... I ride! LOL
Enjoy,
5th :highfive:
THANK YOU!!! Totally saved me today.
One thing that I noticed. After pushing the correct build.prop, I had to fully power down, then turn back on my Razr for it to load up the fixed build.prop.
error message,Help please
Hello, when i am going to mount and change the permission i am getting constant error od device not found or sh:not found.
What to do?Help me please?
jigarpattani said:
Hello, when i am going to mount and change the permission i am getting constant error od device not found or sh:not found.
What to do?Help me please?
Click to expand...
Click to collapse
What step are you on? What phone do you have? More info please?
i am have problem whit my pantech flex i need to use the build.prop.bak but when i type the su it stay in blank do nothing any ideas pls help
ehy there hope someone can help me...i have an archos 97b platinum, messed up with build.prop. So i pulled out and restored but can't push in any way. I have a cwm installed, tablet rooted but i alwais got "permission denied" at push command. Other error is operation not permitted" if i try remount command from adb. i can do mount -o rw,remount /dev/block/mtdblock7 /system but after that push still give me permission denied.
any suggestion?
http://imgur.com/FDLp4fl
i open a 2nd cmd, give the mount -o rw,remount /dev/block/mtdblock7 /system , and system is now rw, but from the first cmd when i give "push build.prop /system (or /system/build.prop) it will always return me permission denied
help
dev.block
i want to view to dev/block using adb shell #
eg . what block is boot.img
what block is recovery.img
what block is system.img
what block is cache.ing
adb shell getprop mtd is not work . Pls Help Me & sent to mail [email protected]
ADB:-
Android Debug Bridge
Very useful program made itself by Google for Programmers and developers. Its based on command line and basically communicates with your Android to respond to certain commands. There is vast amount of knowledge about adb but its most useful commands limit to getting:-
Logcat:-
A real time log of what is happening in background of our devices. It is really useful for developers to see which component has malfunctioned and helps to narrow down their search for what failed and what needs to be fixed. Several times users are asked to give logcats of their devices which are giving errors. We will go in detail that how to get logcats in every and easiest way possible.
App Installation and Management:-
adb proves really handy if you want to install apks directly from your PC or want to batch install or delete them.
Shell Execution:-
You must have heard of Terminal Emulator. It is an app for android to execute shell commands(linux commands) which are basically present as applets in /system/bin, /system/sbin or /system/xbin(in our case) folders. A very imporant applet called busybox is installed there mainly used for execution of basic commands during root browsing or ROM installation. Many times updater script of ROMs use busybox commands to install it. Well, these commands can be initiated from your device too but they can be initiated from adb also making it easy for programmers.
Pushing and Pulling:-
Most used commands of adb. adb makes it a piece of cake for new device developers to get an ideo of structure and basic knowledge of devices by pulling command. We can pull out i.e copy any files or folders from our devices to our PC, even the root directories without rooting the devices. It help rooters and ROM chefs of new devices to get an idea and implement their mods on them. Pushing is also very useful command. It copies your files and folders from PC to your device. Very useful in pushing some /system apps and other things
Remounting and setting permissions
Basic commands:-
Of-course basic commands such as reooting and rebooting in recovery ode and download mode are supported.
Others:-
There are several other features of adb such as fastboot, aapt, etc
Setting up ADB
Pre Requirements:-
A little amount of brain
PC(This is a windows guide, if asked I will add linux and mac guide later)
Java Runtime environment or Java Developing kit
Your Device Drivers
An Android Device
Assuming you all these ready and working properly, we continue
If you are having trouble completing Pre-Requisites, there are several guides featuring them too
Start
1. First Download Android SDK. Roughly about 70 MB
2. There may be any compressed zip file or exe file
If zip file, then extract it to C:\android-sdk
If exe file then double click on it and install it in C:\ Drive(or any other drive you want)
3. Now to get adb and other tools, you need to download 'Platform Tools'
To download them, go to the android-sdk folder and double click on SDK Manager
It will ask you which package to download? However, it is your choice which package to Download, but here, we will only talk about platform
Tools. So, simply tick on Platform Tools and click on install. Once you have done it. Go to the platform-tools folder in the directory where you installed android-sdk. You will find several files there like adb, fastboot, aapt, etc
4. Now, you can backup the whole folder of android-sdk to any external storage that will make you not download package
again if you want to. You can have it placed in any computer and run it as it does not require registry to work
5. Now, you are just one step away from using adb. Next step is SKIPPING SETTING ENVIRONMENT VARIABLE
Many guides on internet say that it is to be done for making it easy for users and if you have some basic knowledge of Command Prompt,
you will know that to execute any application with command prompt, you first need to change the directory to the one where application is
placed. And to skip changing the directories every time you open CMD, you need to put that application is environment variable. Howeve, we will not do so.
6. Type cmd in the search bar. Copy cmd.exe from there. Go to the directory where you have installed android-sdk. Go to platform-tools folder. Paste cmd there, right click on it and in the settings, select Run as Administrator.
7. You are done. Now what to do in it?
ADB Commands
Type adb in command prompt. And several commands will show up on your screen. It is very difficult to analyse these all commands, so we will only talk about most used and important commands
Connect your device via USB cable
And open the CMD in platform-tools folder(Make a shortcut of it on desktop). And type the suitable commands
Code:
adb devices
Will show the list of devices attached to the PC andtheir serial numbers. If this shows up correctly on your PC, then it means that everything is fine for continuing.
Logcat
Code:
adb logcat
It will display the real time log of your device
Best time to do it is when your device boots up
Now, many users ask me how to copy the logcat and upload it from CMD
There are several methods:-
1. Right click on the Title Bar of Command Prompt. Hover the cursor over edit and select mark. Select all the things you want to copy and then click enter. All the things will be copied to clipboard.
2. This is the correct way of getting logcat saved.
Code:
adb logcat > logcat.txt
This command will create a logcat.txt document in platform-tools folder with the complete logcat of the device. Ofcourse you can type any name instead of logcat.txt
3. I prefer taking logcat this way as it neatly compiles logs of different time
Code:
adb logcat -v long > logcat.txt
This is a very nice way to get logcat.
Installing Apps
Code:
adb install %PATH OF APK%
This will install an app on your Android
For example, if my app AreeB.apk is in G:\ drive (G:\AreeB.apk)
Then I will type
Code:
adb install G:\AreeB.apk
Be sure your apk is not in a folder that has space in its name, else the command will break at space bar.
For eg:-
G:\Program Files\AreeB.apk
Mounting
However, I never found any problem in tweaking with system files with adb, but some users said that they couldn't do it, so the problem was that their system partition was mounted as Read Only(R/O)
So, it is necessary now to tell how to mount system partition as Read Write(R/W)
Code:
adb remount
It is easiest way to do so, if it does not work then
There is another method that we will discuss in ADB Shell commands section
Pushing and Pulling
For pushing,
Type
Code:
adb push %PATH TO BE PUSHED% %PATH WHERE TO BE PUSHED%
Suppose I have an app named SystemUI.apk(PATH = G:\SystemUI.apk) which I want to push in /system/app/ on my android(or in other words, install an app as a system app). Then I would type
Code:
adb push G:\SystemUI.apk /system/app/
More examples
G:\Dance.txt file to be pushed in Dance folder in sdcard
Code:
adb push G:\Dance.txt /sdcard/Dance/
OR
Code:
adb push G:\Dance.txt /mnt/sdcard/Dance/
G:\Movies folder to be transferred in SDCARD in Videos Folder
Code:
adb push G:\Movies /sdcard/Videos/
G:\system\framework\framework-res.apk to be pushed in /system/framework/
Code:
adb push G:\system\framework\framework-res.apk /system/framework/
For pulling,
push command replaces with pull and paths are swapped
Code:
adb pull %PATH TO BE PULLED FROM% %PATH TO PLACE PULLED FILE%
Example,
All system apps are to be pulled to G:\ROM\system\app
Code:
adb pull /system/app G:\ROM\system\app\
build.prop to be extracted to desktop
Code:
adb pull /system/build.prop C:\Users\Areeb\Desktop\
However, if a folder is in platform-tools folder, you don't need to type full path
Suppose if I type
Code:
adb pull /system/ system
Then a folder named system will be created inside platform-tools with all the files in system in it
If a file is in platform-tools folder, then also no need to type full path
For example,
There is an app name DeskClock.apk in this folder then, to push it to /system/app, type
Code:
adb push DeskClock.apk /system/app/
ADB Shell Commands
This mode of adb allows you to execute linux shell commands from your PC
These commands can aldo be executed through the mobile using Terminal Emulator
To initiate shell mode
Type
Code:
adb shell
You will get an prompt like this
sh-3.2#
Now you are in shell mode
adb commands won't work here and a new set of commands will work here. But we will only go in a little detail here.
Assuming you are in adb shell mode, I will only type commands that will work on shell. Note:- These commands won't work if you type them alone on cmd. But, these command will directly work on your mobile's Terminal Emulator
As these commands can also work on mobile, I am going to tell you a way of taking logcat on mobile
Type
Code:
logcat
You will see log of your device
To save this
Type
Code:
logcat > /sdcard/log.txt
A file named log.txt will be generated in sdcard
Uninstalling Applications
Code:
cd /data/app
This will change the directory to /data/app
Code:
ls
This will show the list of files in there
Suppose, there is an app named com.opera.browser (Opera Mobile) you want to uninstall it
Type
Code:
rm -r com.opera.browser
This will uninstall the app
Mounting Command:-
Code:
mount -o rw,remount system /system/
Miscellanous commands:-
su: Initiates root request
du: Shows files, folders and size
date: Shows todays date
surfaceflinger: Shows your bootanimation (Tested on GB)
grep: Used to search through text files
chmod: Sets permission to files
sh: Initiates shell mode
echo: Displays the text you wrote with the command. Analogous to PRINT command on QBasic
Forgot next ones, will write later
Credits
Google: For Android and several searchings
Samsung: For Galaxy Ace s5830I
Broadcom: For their Open Sourceness
XDA Forums : For the precious knowledge
My Uncle: For gifting me this Phone
My Teachers: For teaching me English(I would not be here without them)
You: For future Thanks
Till now, thats it, will add some more things later
If any problem, I will add it too
Suggestion? They are welcome
Nice thread , every thing is very clearly stated.
Thx, Nice guide.
I suggest to change the 'remount' command in:
mount -o remount,rw /system
As the effect is the same and it works universally (at least, should)
Sent from my GT-5660 using xda app-developers app
ItachiSama said:
I suggest to change the 'remount' command in:
mount -o remount,rw /system
As the effect is the same and it works universally (at least, should)
Sent from my GT-5660 using xda app-developers app
Click to expand...
Click to collapse
I use the command you mentioned every time. Thanks for reminding. I can't remember why I wrote that command there!
I have seen several of threads asking about how to recover data from a phone that has a broken display.
Backing up a phone with broken display
Prerequisites
Rooted phone with broken display/digitizer/etc. Display is nonfunctional for whatever reason.
ADB for your platform. Downloads for Windows, Mac, and Linux can be found at my dev-host.
Drivers installed (Windows), rules file set up (Linux + Mac). Drivers for windows can be found here. Rules file for Linux can be found here.
Recovery file attached to this post. (twrp.img)
External sdcard with at least 2 GB free space inserted in your broken phone.
openrecoveryscript.txt file attached to this post.
Click to expand...
Click to collapse
Click to expand...
Click to collapse
Backing up your broken device
Extract the ADB zip somewhere convenient.
Move the twrp.img recovery file into the ADB extracted directory.
Move the openrecoveryscript.txt file into the ADB directory.
Open a command prompt / terminal window in the ADB directory.
Windows: Windows Key + R => Type in "cmd" then click "RUN".
Linux: Open a terminal window by selecting it from your applications.
ALL:
Code:
cd /path/to/ADB/directory
Pull the battery from your phone, place it back in and boot into recovery (VolUp + Home + Power).
Connect your phone to your computer
Make sure that the following command returns "XXXXXX recovery" before proceeding to the next step.
Code:
./adb devices
Expected output:
Code:
List of devices attached
XXXXXXX recovery
Now to install TWRP recovery to your device. Type the following commands ( after each line). Linux users: Make sure you prepend each command with "./", as in "./adb ...". ALL Make sure you type the commands in CAREFULLY.
Code:
adb push twrp.img /tmp/twrp.img
adb shell dd if=/tmp/twrp.img of=/dev/block/mmcblk0p18
Wait until the last command above returns an output similar to below before proceeding to the next step:
Code:
12916+0 records in
12916+0 records out
6612992 bytes (6.3MB) copied, 1.094278 seconds, 5.8MB/s
Now pull your phones battery and reboot into recovery once again.
Run the following command to make sure your phone has booted into recovery completely.
Code:
adb devices
Expected output
Code:
List of devices attached
XXXXXXX recovery
Type the following to set up a script that will backup your phone to your external sdcard.
Code:
adb push openrecoveryscript.txt /cache/recovery/openrecoveryscript
Reboot your phone once more. This time, TWRP will begin backing up your ROM.
Wait for the backup to finish. You will know it is finished when you feel your phone reboot once more.
Optionally, you can check the state of your backup by running the following command and reading the last couple lines of it's output.
Code:
adb shell cat /tmp/recovery.log
Click to expand...
Click to collapse
Click to expand...
Click to collapse
That's it! Your entire system (/system, /data, /cache, and boot) will be backed up to your external sdcard. Just pop the sdcard in your replacement phone and you're good to go.
Enjoy and donate to the TWRP devs! This would not be possible if TWRP did not use the OpenRecoveryScript scripting engine!
Don't forget to attach your script.txt file!
Also, I was thinking if its easy enough to just edit your existing script, maybe post ones that can wipe data/factory reset and possibly some other functions available in TWRP?
Sent from my SGH-T999 using xda premium
DocHoliday77 said:
Don't forget to attach your script.txt file!
Click to expand...
Click to collapse
Ah, whoops! Files can be found here until I can get to a computer: http://forum.xda-developers.com/showthread.php?p=43332650
The Thanks button is just to avoid "THANKS" posts in threads. Nothing more. Don't defeat the purpose of why it was introduced.
DocHoliday77 said:
Also, I was thinking if its easy enough to just edit your existing script, maybe post ones that can wipe data/factory reset and possibly some other functions available in TWRP?
Click to expand...
Click to collapse
I don't want to reinvent the wheel, but there areapps that can do that I'll post a couple scripts later though :thumbup:
The Thanks button is just to avoid "THANKS" posts in threads. Nothing more. Don't defeat the purpose of why it was introduced.
CNexus said:
I don't want to reinvent the wheel, but there areapps that can do that I'll post a couple scripts later though :thumbup:
The Thanks button is just to avoid "THANKS" posts in threads. Nothing more. Don't defeat the purpose of why it was introduced.
Click to expand...
Click to collapse
Which apps? I'm currently in a position where I need to erase my phone but the screen doesn't work.
porfymartinez said:
Which apps? I'm currently in a position where I need to erase my phone but the screen doesn't work.
Click to expand...
Click to collapse
Ah. Replace the text inside the openrecoveryscript.txt with this following
Code:
wipe data
wipe cache
wipe dalvik
wipe system
Optionally, add the following (to the script I wrote above) to wipe your internal storage.
Code:
mount data
cmd rm -r /data/media
The Thanks button is just to avoid "THANKS" posts in threads. Nothing more. Don't defeat the purpose of why it was introduced.
Anybody knows how to enable third-party apps to access SD Card? Things that were working under 5.1 are not under 6.0 anymore.
Well, it seems Google is really retarded regarding SD Card access, changing API every other version:
http://stackoverflow.com/questions/32129716/how-does-storage-access-change-on-android-6
Radek Hulán said:
Anybody knows how to enable third-party apps to access SD Card? Things that were working under 5.1 are not under 6.0 anymore.
Click to expand...
Click to collapse
i used the old Kitkat fix for my brief period on 6.0, but i rolled back to 5.1 for the time being, battery drain was too much.. here
Well, not going to root my device to gain basic features such as being able to delete photos Camera app put on SD card.
This is insane.
(connect phone with USB debugging)
adb reboot bootloader
fastboot boot twrp.img
** TWRP: MOUNT > SYSTEM
** TWRP: Advanced > File > "chmod 775" on system/build.prop
adb pull /system/build.prop %USERPROFILE%
** EDIT FILE, set ro.lge.adoptable_storage=true
adb push %USERPROFILE%\build.prop /system/build.prop
adb shell
chmod 644 /system/build.prop
exit
adb reboot
Now you can format SD card as internal storage and use it for data
Thanks Radek for this!!!
Radek Hulán said:
(connect phone with USB debugging)
adb reboot bootloader
fastboot boot twrp.img
** TWRP: MOUNT > SYSTEM
** TWRP: Advanced > File > "chmod 775" on system/build.prop
adb pull /system/build.prop %USERPROFILE%
** EDIT FILE, set ro.lge.adoptable_storage=true
adb push %USERPROFILE%\build.prop /system/build.prop
adb shell
chmod 644 /system/build.prop
exit
adb reboot
Now you can format SD card as internal storage and use it for data
Click to expand...
Click to collapse
interesting. i see on some lines there are twrp. so this method can only be used with G4 variants that has twrp? CMIIW
i'd really like to try this on my H818P but there's no TWRP for the variant yet...
Good work mate
Requires root ?
It does not require root, but you must have unlocked bootloader.
Odesláno z mého LG-H815 pomocí Tapatalk
Radek Hulán said:
(connect phone with USB debugging)
adb reboot bootloader
fastboot boot twrp.img
** TWRP: MOUNT > SYSTEM
** TWRP: Advanced > File > "chmod 775" on system/build.prop
adb pull /system/build.prop %USERPROFILE%
** EDIT FILE, set ro.lge.adoptable_storage=true
adb push %USERPROFILE%\build.prop /system/build.prop
adb shell
chmod 644 /system/build.prop
exit
adb reboot
Now you can format SD card as internal storage and use it for data
Click to expand...
Click to collapse
can you explain me what do you mean with
* TWRP: MOUNT > SYSTEM
** TWRP: Advanced > File > "chmod 775" on system/build.prop
adb pull /system/build.prop %USERPROFILE%
** EDIT FILE, set ro.lge.adoptable_storage=true
i dont know it, thanks
Continue working this metod?
Sorry for me bad english xD
[email protected] said:
can you explain me what do you mean with
* TWRP: MOUNT > SYSTEM
** TWRP: Advanced > File > "chmod 775" on system/build.prop
adb pull /system/build.prop %USERPROFILE%
** EDIT FILE, set ro.lge.adoptable_storage=true
i dont know it, thanks
Click to expand...
Click to collapse
Download TWRP for LG G4, run it:
https://twrp.me/devices/lgg4h815.html
In TWRP, select Mount > System, from menu, and continue according to these instructions.
ADB is part of Android SDK tools:
http://developer.android.com/sdk/index.html#Other
I don't know if it is the same problem but I believe it is, so my problem is that I can transfer files from SD to internal but it doesn't work the other way around, I don't want to unlock my bootloader so is there anything else I can do? Thanks
any idea why the G4 is stuck at the Tmobile screen after:
Using the ES root browser and changing the file build.prop manually ( ro.lge.adoptable_storage=true), got the stuck tmobile starts creen
then running the adb commands as per the instructions, then also changing the permission using TWIRP
Nazdar Radku,
the solution is known feature of MM (adopt external storage), but biggest dissadvantage of this, is that you cannot use SD card in other devices anymore - not only in PC using some reader, but not even in other LG-ie your lg g4 broke....no way to get your data back. For some reason LG didnt include this functionality of MM yet. 2nd disadvantage is slowing down your device, as acces, R/W ops are quite slower. And I agree with googles approach to SD card - they want to "protect" users is foolish - you cannot protect stupid people, they should make it as default but keep option for advanced users to access storage as before KK for advanced user as it could be done with KK & LP using that media_rw grp hack.
coolmaster121 said:
any idea why the G4 is stuck at the Tmobile screen after:
Using the ES root browser and changing the file build.prop manually ( ro.lge.adoptable_storage=true), got the stuck tmobile starts creen
then running the adb commands as per the instructions, then also changing the permission using TWIRP
Click to expand...
Click to collapse
I don't think you should ever use a file browser to modify your build.prop. Something about the file being truncated. The modified build.prop ends up being a different size/structure or something along those lines. You should use a dedicated build.prop editor app, or adb commands only. If you had done that chances are you wouldn't have any problems.
IF you have a custom recovery you may be able to restore your original prop file through it in order to get it to boot.
rick09 said:
I don't think you should ever use a file browser to modify your build.prop. Something about the file being truncated. The modified build.prop ends up being a different size/structure or something along those lines. You should use a dedicated build.prop editor app, or adb commands only. If you had done that chances are you wouldn't have any problems.
IF you have a custom recovery you may be able to restore your original prop file through it in order to get it to boot.
Click to expand...
Click to collapse
I resolved the issue by basically booting back in to TWIRP, flashing the stock image again. (didnt loose any files as I didnt do a wipe)
Then ran through the commands from the previous post. But the "set" did not work for me. I then downloaded the build.prop file to the desktop using the "get" command and edited it with wordpad, saved and then sent over the edited file, followed the rest of the permissions and it worked fine then.
Good that you got it figured out but you did it the hard way! All you have to do is download https://play.google.com/store/apps/details?id=com.jrummy.apps.build.prop.editor
Make a backup in the app just in case, then find the entry, make your changes, and reboot. All done on your device.
rick09 said:
Good that you got it figured out but you did it the hard way! All you have to do is download https://play.google.com/store/apps/details?id=com.jrummy.apps.build.prop.editor
Make a backup in the app just in case, then find the entry, make your changes, and reboot. All done on your device.
Click to expand...
Click to collapse
Just tried, it, does not seem to work. it changes the value, says I need to restart, but after restart it goes back to false
Lg G4 SD card as internal storage
Can someone tell me a little more detail on this im new to this and trying to figure it out for myself what software do I need and how to do this to my 2 lg G4's