[Q] ADB commands - Android Q&A, Help & Troubleshooting

Hi everyone! I'm new in the community but a know a thing or two about technology. I wrote this thread to see if someone helps me out solving a problem I have.
I have a Vodafone Smart II with Gingerbread 2.3 not rooted anymore, I'll explain later. I edited Android/system/build.prop file:
(Original) ro.build.version.sdk=10
(Edited) ro.build.version.sdk=11
When I rebooted the phone, it launched normally but when I tried to open Play Store and my Superuser app it force closed it.
Only system apps did not force close, I formatted the phone to see if it could restore the build.prop but did not worked, so my phone is not rooted now, but it has SuperUser app installed but not opening.
Now I am trying to use ADB to copy the build.prop, edit it with Notepad++ and push it to system/bin again.
I need to know if I need any command to give permissions to ADB to change and push build.prop and if so which commands are.
Any suggestions?

As long as you're not rooted you will not have access to /system

Related

[Q] Rage root + Superuser.apk

Question: Is your Superuser app asking for permissions from apps? Mine isn't. On my old rooted Eris, if I ran an app such as Titanium Backup or Root Explorer, I would get a dialog which would ask if I wanted to grant that app root access. This dialog was via the Superuser app. I don't get that now. It seems like any/every app on my phone has su access.
I'm wondering if it's just me or if this is the way the current root exploit works.
DeezNotes said:
Question: Is your Superuser app asking for permissions from apps? Mine isn't. On my old rooted Eris, if I ran an app such as Titanium Backup or Root Explorer, I would get a dialog which would ask if I wanted to grant that app root access. This dialog was via the Superuser app. I don't get that now. It seems like any/every app on my phone has su access.
I'm wondering if it's just me or if this is the way the current root exploit works.
Click to expand...
Click to collapse
It's just you. Try running root explorer or a screen cap program, and verify that you have root access. You may want to use an updated Superuser.apk too, I know the one I'm using (2.3.6.1) asks, (unless I told it not too).
I'm using Superuser 2.3.6.1. When I run Titanium or Root Explorer, everything works without prompting. Now, I'm concerned.
UPDATE: I opened Superuser, went to settings, scrolled to the bottom and updated the su binary. Now, I get prompted when an app needs access. Problem is, when I reboot the su binary is reset. I think this is due to me using the joeykrim root procedure, which uses a version of su that is scripted to be put in place during the boot process. I'm going to take a look at his scripts and change them so I can keep the su binary installed by the Superuser.apk.
Thanks for the info.
Confirmed my issue was due to using the joeykrim method. I backed out his procedure and used Dirrk's method (posted here: http://forum.xda-developers.com/showthread.php?t=779238) and I get a proper Superuser prompt when an application needs access.
I also noticed another flaw in the joeykrim method. Since his procedure was developed for the Epic, he has some incorrect file names in some places.
If you notice in his instructions where he says use playlogos1 instead of playlogos, this is not updated in all of his steps.
To get your boot screen back, you have to change the last line of playlogos1 or playlogosnow (based on whether you did the lag fix or not)
The file that will not show your boot animation will look like this:
Code:
#!/system/bin/sh
#joeykrim-SDX sdx-developers.com scripted
/system/bin/joeykrim-root.sh
/system/bin/playlogo-orig
To fix it, change the last line to read:
Code:
#!/system/bin/sh
#joeykrim-SDX sdx-developers.com scripted
/system/bin/joeykrim-root.sh
/system/bin/playlogos1-orig
In summary, the playlogos1 file is used to execute other startup scripts. The original playlogos1 file has the boot animation in it. It must be referenced in one of the startup scripts. Since these instructions were used for the Epic, there's a slight typo which keeps the original playlogos1 file from being executed.
Thanks--I came to the forums looking for a solution to the fact that my boot animation was now missing. I tried making your changes but I still can't seem to recover it. Here are what my playlogo scripts look like, keeping in mind I have also installed the lag fix:
playlogos1
Code:
#!/system/bin/sh
sh /system/bin/userinit.sh
playlogosnow
playlogosnow
Code:
#!/system/bin/sh
#joeykrim-SDX sdx-developers.com scripted
/system/bin/joeykrim-root.sh
/system/bin/playlogos1-orig
I'll also have a 3rd file called just playlogo (which was very long). Do you know what the issue is? Thanks so much for your help.
theicemonkey said:
Thanks--I came to the forums looking for a solution to the fact that my boot animation was now missing. I tried making your changes but I still can't seem to recover it. Here are what my playlogo scripts look like, keeping in mind I have also installed the lag fix:
playlogos1
Code:
#!/system/bin/sh
sh /system/bin/userinit.sh
playlogosnow
playlogosnow
Code:
#!/system/bin/sh
#joeykrim-SDX sdx-developers.com scripted
/system/bin/joeykrim-root.sh
/system/bin/playlogos1-orig
I'll also have a 3rd file called just playlogo (which was very long). Do you know what the issue is? Thanks so much for your help.
Click to expand...
Click to collapse
Judging by what your files look like, things should work. The original file is playlogos1. We never touch the playlogo file from what I can remember, so let's not do anything there.
What I would do is make sure the permissions are straight on all the files listed above (primarily playlogos1). They should be 755 (shown below):
Code:
# cd /system/bin
# ls -l playl*
-rwxr-xr-x root shell 10060 2010-08-12 04:30 playlogo
-rwxr-xr-x root root 106 2010-09-11 18:53 playlogos1
-rwxr-xr-x root root 177 2010-09-11 18:55 playlogos1-lagfix
-rwxr-xr-x root shell 14420 2010-08-12 12:30 playlogos1-orig
-rwxr-xr-x root shell 14204 2010-08-12 04:30 playlpm
#
If all else fails, you can always grab the original file from the system dump off of this link: http://forum.androidcentral.com/fascinate-roms-hacks/32839-fascinate-system-dump.html
DEAR GOD
Well, I'm an idiot.
I tried to take the playlogos1 file from the dump you showed me and copy it to my /system/bin file and, sure enough, I got the boot animation back. Problem is, I didn't think it through (that the edited playlogos1 file pointed to the rest of the modified boot sequence) and then the phone wouldn't boot. It would just loop the animations.
I booted into recovery, did a factory reset, and now I can get to the lockscreen and the very beginning of setup but TWLauncher force closes over and over and over and I'm unable to do anything except pull down the notification bar occasionally. I think this is because I moved some things (like bing, daily briefing, etc.) that TWLauncher wants at the outset, and it doesn't have them. I tried to bluetooth over LauncherPro and run it, but it fails at the last moment.
Does anyone know of a way to get to ADB Shell so that I can fix my mistake? Or if someone had an update.zip I could flash to get back to factory (with all of the system files in place), that would be super! Otherwise, it looks like I'm effed and will need to come up with a good story to tell Verizon...
theicemonkey said:
Well, I'm an idiot.
I tried to take the playlogos1 file from the dump you showed me and copy it to my /system/bin file and, sure enough, I got the boot animation back. Problem is, I didn't think it through (that the edited playlogos1 file pointed to the rest of the modified boot sequence) and then the phone wouldn't boot. It would just loop the animations.
I booted into recovery, did a factory reset, and now I can get to the lockscreen and the very beginning of setup but TWLauncher force closes over and over and over and I'm unable to do anything except pull down the notification bar occasionally. I think this is because I moved some things (like bing, daily briefing, etc.) that TWLauncher wants at the outset, and it doesn't have them. I tried to bluetooth over LauncherPro and run it, but it fails at the last moment.
Does anyone know of a way to get to ADB Shell so that I can fix my mistake? Or if someone had an update.zip I could flash to get back to factory (with all of the system files in place), that would be super! Otherwise, it looks like I'm effed and will need to come up with a good story to tell Verizon...
Click to expand...
Click to collapse
Sorry you're having issues. Bad news is, you can't flash any zip updates because we don't have a custom recovery re our phones yet. However, what you should be able to do is use adb to push the apps from /system/app from the system dump. That is.. if you can get adb to work? If it can work from recovery, that should save you.
Good luck.

Deleted build.prop and reboted phone

I got the notice on my Gf's phone that I need to update. after it failed I tried a few things among them replacing the build.prop
Unfortunatilly I removed the build.prop and did not secussfully replace it. I can still use adb but if i try to push the build.prop to the /system folder it says premission denied read only.
I tryed to grand superuser permissions but after the su command the super user permission dialog doesnot come up on my phone. atcually nothing shwes up on the phone but the top information pannel which i can bring down to view notifications. but I cannot acess anything else.
Also the resolution looks to be about half of what it is suposed to be.
PLEASE HELP, my girlfriend is going to have my nutz, and my nexus one.
EDIT:
used the exploit from the first post in this section. then after the ./exploit command I was able to load up the build.prop
Does the $ change to a # when you type su?
porcupineadvocate said:
Does the $ change to a # when you type su?
Click to expand...
Click to collapse
sorry i have not tried using exploid rooting method . why dont you use universal androot. its easy and if you need build.prop then i have attached for you and also universal androot.

[Q] How to make system apk ("adb push xy.apk /system/app") persistent through reboot?

[Q] How to make system apk ("adb push xy.apk /system/app") persistent through reboot?
First regarding my environment: I have Cyanogenmod 10.1 (self-built) on my Samsung I9300 Int., but I assume the question applies to every android version (I'm new to android development and flashing custom firmwares to my phone, but I have thorough experience with other embedded devices and gnu/linux):
I'm currently modifying a system apk (specifically LockClock.apk), which comes with CM10.1. From time to time, I "adb push" a modified version of the apk to my /system/app. (When the app works), it works without problems until the phone is restartet. After the reboot, the application does no longer appear to be installed (though the modified apk is still present in /system/app). I have to "adb push" the apk again, to make it work again. Is there a way to make the app permanently installed after an "adb push"?
Thank you very much
Nico
AW: [Q] How to make system apk ("adb push xy.apk /system/app") persistent through reb
Meanwhile, I found part oft the solution myself: when manually removing the apk (adb shell rm /system/app/LockClock.apk) before pushing the new version, it will persist through a reboot.
Can someone explain this to me? And is there maybe another/better way of doing this?
Did u fixed permissions after pushing it to system/app folder?
set permissions to rw-r--r--

[GUIDE] Get 48 GB Free promotional Dropbox space

I saw a post in this thread about getting the promotional space on AT&T S4 without flashing TMobile roms. I gave it a try, and it worked just fine. So I thought of sharing the files with you. I pulled them out of a deodexed TMobile rom.
Download the attached file. You need to push Dropbox.apk and DropboxOOBE.apk into system/app and fix permission. Then you need to push com.dropboxpartner into system/framework and again fix permission.
Then, you need to modify the build.prop using a root explorer. Find the following lines and modify them as follow:
ro.product.model=SGH-M919
ro.product.name=jfltetmo
ro.product.device=jfltetmo
Reboot your device, open the Dropbox app, and log in with your existing account, or create a new account. You will receive an email, and after fulfilling 5 of the 7 tasks, you will receive the 48 GB promotional space. After fulfilling the tasks, you can restore your build.prop to its original state.
Attached Files:
http://d-h.st/fZJ
smnfriend said:
I saw a post in this thread about getting the promotional space on AT&T S4 without flashing TMobile roms. I gave it a try, and it worked just fine. So I thought of sharing the files with you. I pulled them out of a deodexed TMobile rom.
Download the attached file. You need to push Dropbox.apk and DropboxOOBE.apk into system/app and fix permission. Then you need to push com.dropboxpartner into system/framework and again fix permission.
Then, you need to modify the build.prop using a root explorer. Find the following lines and modify them as follow:
ro.product.model=SGH-M919
ro.product.name=jfltetmo
ro.product.device=jfltetmo
Reboot your device, open the Dropbox app, and log in with your existing account, or create a new account. You will receive an email, and after fulfilling 5 of the 7 tasks, you will receive the 48 GB promotional space. After fulfilling the tasks, you can restore your build.prop to its original state.
Attached Files:
http://d-h.st/fZJ
Click to expand...
Click to collapse
Worked great for me, thanks! I already had 12GB and had completed the 5 Getting Started steps long ago. When I signed into the DropBox app and got it setup, I suddenly had 60GB for 24months and an email from DropBox.
Here's the instructions I followed:
Cleared cache of, cleared data of, and uninstalled the DropBox app I already had.
Reminder: backup your build.prop
I ended up using this build.prop Editor. When you open it, use the menu key to make a backup before touching anything. Then scroll through and make the changes prescribed in the OP.
Downloaded the file attached in OP.
Extracted files using my computer to my internal sdcard. Possible to do this with apps on your phone (various file explorers or unzip programs), but I found it easier to just do it over USB/MTP.
Fired up ADB Shell - could also use a terminal emulator from the device, but do not use the "stop" command below if you are using an emulator on the device.
Performed the following commands (after running "adb shell" from a command line on the computer):
Code:
$ su
# mount -o rw,remount /system
# stop
# cp /sdcard/Dropbox.apk /system/app
# cp /sdcard/DropboxOOBE.apk /system/app
# cp /sdcard/com.dropboxpartner.jar /system/framework
# reboot recovery
Device rebooted into TWRP, where I used the Advanced menu to Fix Permissions.
Rebooted back into the System like normal.
Opened the DropBox app and signed in. Setup the camera sync again of course (awesome feature).
Checked my mail - Woot.
Used the build.prop editor to restore my build.prop
Closed the build.prop editor and re-opened. For some reason after restoring the backup, the restored changes were not reflected until I restarted the editor. Whatever, but it worked.
Worked for me:thumbup: Thanks! Now what to do after the two year promo period ends...
Sent from my SAMSUNG-SGH-I337 using xda app-developers app
I'm already up to 50GB on doing something like this before. I'm not sure if it'll work again but I'll give it a whirl sometime today. Will report back if I find myself up to 98GB.
Perfectly working.
Followed general instructions (used FX root explorer instead of Android Terminal for dropping apks in designated locations) and this worked just fine without a hitch. I appreciate the straightforward and simple instructions.
All I did was flash Wicked (T-Mobile ROM) then KTOONSEZ touchjizz kernel. After getting my free dropbox space, I flashed back.
Sent from my SGH-I337 using xda premium
lol same here with GOLD3N3Y3 rom; any non-ATT rom works if you DL and activate it. i have my own server so im letting everyone in my family use it for our stuff.
Slade8525 said:
lol same here with GOLD3N3Y3 rom; any non-ATT rom works if you DL and activate it. i have my own server so im letting everyone in my family use it for our stuff.
Click to expand...
Click to collapse
i can confirm that this works on vzw.
Thanks, worked great on my VZW S4.
Aou said:
Worked great for me, thanks! I already had 12GB and had completed the 5 Getting Started steps long ago. When I signed into the DropBox app and got it setup, I suddenly had 60GB for 24months and an email from DropBox.
Here's the instructions I followed:
Cleared cache of, cleared data of, and uninstalled the DropBox app I already had.
Reminder: backup your build.prop
I ended up using this build.prop Editor. When you open it, use the menu key to make a backup before touching anything. Then scroll through and make the changes prescribed in the OP.
Downloaded the file attached in OP.
Extracted files using my computer to my internal sdcard. Possible to do this with apps on your phone (various file explorers or unzip programs), but I found it easier to just do it over USB/MTP.
Fired up ADB Shell - could also use a terminal emulator from the device...
Performed the following commands:
Code:
$ su
# mount -o rw,remount /system
# stop
# cp /sdcard/Dropbox.apk /system/app
# cp /sdcard/DropboxOOBE.apk /system/app
# cp /sdcard/com.dropboxpartner.jar /system/framework
# reboot recovery
Device rebooted into TWRP, where I used the Advanced menu to Fix Permissions.
Rebooted back into the System like normal.
Opened the DropBox app and signed in. Setup the camera sync again of course (awesome feature).
Checked my mail - Woot.
Used the build.prop editor to restore my build.prop
Closed the build.prop editor and re-opened. For some reason after restoring the backup, the restored changes were not reflected until I restarted the editor. Whatever, but it worked.
Click to expand...
Click to collapse
Using terminal emulator, after using #stop, device screen goes black... what do I do, just wait?
Cinosinu said:
Using terminal emulator, after using #stop, device screen goes black... what do I do, just wait?
Click to expand...
Click to collapse
You need to do it from your computer terminal/shell using adb shell command through the USB, not using a terminal emulator on the device. Stop does exactly what it says, it stops the device from running I think , or maybe just pauses.
You should be able to copy the files without stop though, it's probably riskier, and then you need to use reboot. You just need to copy the files into the right locations and then fix the permissions.
Cinosinu said:
Using terminal emulator, after using #stop, device screen goes black... what do I do, just wait?
Click to expand...
Click to collapse
These are linux commands. Stop, stops your device, and you cannot use it unless you reboot it. You can punch in the commands through your computer (this way, you need to install android sdk. Then, open the installed folder, and go to sdk\platform-tools. Here, you should hold shift, right click and select "open command window here", and punch the commands). Also, you can simply use a root explorer, and manually move the files to their folders and fix permissions
Just pull the battery and reboot. It happened to me also.
Sent from my SGH-M919 using xda premium
smnfriend said:
Also, you can simply use a root explorer, and manually move the files to their folders and fix permissions
Click to expand...
Click to collapse
What does this mean? I have ES fie explorer, trying to move the files I get a rewrite error. Do i need to fix the permissions first? What is the adb command?
thanks
I got it!!! :victory:
Why didn't someone tell me you must use the command 'ADB Shell' to start?
I'm no expert with ADB obviously. Knew it was something trivial. Hope someone else finds my comment helpful. :highfive:
Thank you OP and all! XDA rocks!
Thanks for pointing these things out. Yes, "stop" should only be used if doing this from an ADB shell. I've updated my instructions a tad bit to reflect this.
How can i do this for multiple accounts? I logged out and in and no luck.
Sent from my SGH-M919 using xda premium
kalparker said:
How can i do this for multiple accounts? I logged out and in and no luck.
Sent from my SGH-M919 using xda premium
Click to expand...
Click to collapse
did you do a factory reset, re-install of your ROM, then the steps again? that may help by giving you a different device ID (you may have had this warning before in TiBU), which i'm guessing DB is looking for to limit 1 upgrade per device ID.
-rf
xrabbitfootx said:
did you do a factory reset, re-install of your ROM, then the steps again? that may help by giving you a different device ID (you may have had this warning before in TiBU), which i'm guessing DB is looking for to limit 1 upgrade per device ID.
-rf
Click to expand...
Click to collapse
That might work. In TiBu, I have the option to create a new, random device ID - might be a Pro feature only. Check your menu key, and near the bottom you can Manager your Device ID...
I would advise a nandroid backup first - this may screw up some of your other accounts, including Google. I've personally never tried it, but I would imagine it could cause some amount of chaos.
thanks!

[Q] Can't install Mms.apk HTC One m7

hi everybody
I need your input!!
So, I am quite new in android world (been using iPhone for a while, but I am tired of their politics)
I recently rooted my HTC One m7 from France, installed a custom ROM MaximusHD 4.4.2, to use it in Japan with softbank
phone call is ok, 3G is working etc,
all went well, just stuck with Mms.apk
sending/receiving MMS here in Japan (softbank) is controlled by UA, so I wanted to install modified Mms.apk package found here
I first put the apk in sdcard, get in recovery (TWRP), installed it
it seemed to succeed, but when I boot back to System, Mms is not in the app drawer
I researched through RootBrowser, the Mms.apk does exist in system/app folder with the permission 644
then I installed through adb, but it says 'Failure [INSTALL_FAILED_ALREADY_EXISTS]'
so, I opened RootBrowser, erased the one I installed earlier, rebooted the device, and I have done the same thing through adb
then it goes : Failure [INSTALL_FAILED_VERSION_DOWNGRADE]
so, I used : ./adb install -r -d
then, next step, it says : Failure [INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES]
In case, I checked system/priv-app folder, and there is an other Mms.apk
I deleted it through RootBrowser, and even with ./adb uninstall in both locations (system/app and system/priv-app) etc,
nothing, it seems I can't install it
why?
the original files are from :
http://forum.xda-developers.com/showthread.php?t=2519733
or
http://forum.xda-developers.com/showthread.php?t=2641940
none of them worked
I would love to have a big help
I am going nuts
thanks a lot

Categories

Resources