[Q] Please help translate some adb instructions into terminal emulator commands - Android Software/Hacking General [Developers Only]

Hi
I have Huawei u8150, Android 2.2, Rooted with z4root.
I want to give widgetsoid access to toggle data using the android apn toggle.
The instructions are:
____
Just put the Widgetsoid apk on /system/app folder
Work only with ADB connected to the phone (doesn't work if you use root explorer or other apps like this) :
* Remount /system as read/write
* adb push Widgetsoid.apk /system/app/Widgetsoid.apk
* Remount /system as read-only
_____
Can someone tell me what I can type in terminal emulator window to achieve this. I can't use adb as it won't recognise my u8150 (It worked fine with my i9000)
Thanks
Kiwi
Widgetsoid website - http://jaumard.android.free.fr/widgetsoid/help_widgetsoid.php?lang=en_EN
PS: Apologies if the wrong forum, but there were only 4 specific android forums, so i thought the general forum would be the best to post this type of question in.

http://android-tricks.blogspot.com/2009/01/mount-filesystem-read-write.html
http://www.reallylinux.com/docs/files.shtml

Thanks
I had tried
$ su
# mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
# CHMOD 777 /SYSTEM
the above works but if i try to push i get
# push
push: not found
I also tried the above then switched over to es-file explorer and was able to copy + pasted the widgetsoid.apk file from my sdcard into the /system/app directory. It correctly pasted the file, but when I clicked on widgetsoid.apk to install the apk i got an error.
"Parse Error: There is a problem parsing the package."

I wouldn't chmod /system ... just leave the permissions the same.
cp /sdcard/downloads/widgetsoid.apk /system/app/
Chmod 644 /system/app/widgetsoid.apk
No need to click install or anything like that... just reboot after copying it to /system/app.
Sent from my Droid using Tapatalk

push is an adb command. You'll want to put the apk on the sdcard then use:
cp /sdcard/Widgetsoid.apk /system/app/
That will copy it to the directory.
Nevermind, do what jeffv2 said.

THANKS! it's working now.
I had placed it in /system/app and did a reboot and it still hadn't installed
then i renamed the file from Widgetsoid2.x.apk to Widgetsoid.apk and also did chmod 644, after a reboot it has successfully installed.
I think it was the chmod 644 to the apk file that allowed it to be installed
Many thanks!

Related

[HOW TO] Fix Quickboot as well as reboot into recovery from ROM Manager.

For those of you who want to use Quickboot
OR
Have ROM Manager from market and want to "Reboot into recovery" directly, do this
Extract Reboot from Reboot.zip and place it in \androidsdk\tools folder
Then
adb shell
mount /dev/block/mtdblock4 /system
exit
adb push reboot /system/bin
adb shell
cd /system/bin/
ls
chmod 755 reboot
chmod 755 /system/bin/reboot
And of course, this can't be done in Android system. You would have to boot to toast's recovery.
Also, i didn't know the command to push from shell, therefore the redundant adb shell. =)
so this takes out the HBoot? and goes straight to Recovery Rom?
unfortunately no,
but it lets you skip the step "Vol up+power" and go straight to stock recovery.
From there you can use the "fake-flash"
awesome...Thanks for sharing, i will try this
I would recommend "rm /system/bin/reboot" before pushing the new one.
Great job! Works like a charm!
I guess TheBiles and I were posting in the wrong sub-forum?
http://forum.xda-developers.com/showthread.php?t=695978
wcasdf said:
For those of you who want to use Quickboot
OR
Have ROM Manager from market and want to "Reboot into recovery" directly, do this
Extract Reboot from Reboot.zip and place it in \androidsdk\tools folder
Then
adb shell
mount /dev/block/mtdblock4 /system
exit
adb push reboot /system/bin
adb shell
cd /system/bin/
ls
chmod 755 reboot
chmod 755 /system/bin/reboot
And of course, this can't be done in Android system. You would have to boot to toast's recovery.
Also, i didn't know the command to push from shell, therefore the redundant adb shell. =)
Click to expand...
Click to collapse
C:\Documents and Settings\Owner>adb shell
# mount /dev/block/mtdblock4 /system
mount /dev/block/mtdblock4 /system
Usage: mount [-r] [-w] [-o options] [-t type] device directory
# exit
what am i doing wrong??
worked great, we are only one step away now
Help......
Hi Sorry to bother..
Have started the process got to push the file to the system bin. However when then attempting the next command adb shell, i recieve the following error:-
- exec '/system/bin/sh' failed: Not a directory (20) -
Any advice????
Cheers
Andy
.....Extract Reboot from Reboot.zip and place it in \androidsdk\tools folder
Then
adb shell
mount /dev/block/mtdblock4 /system
exit
adb push reboot /system/bin
adb shell
cd /system/bin/
ls
chmod 755 reboot
chmod 755 /system/bin/reboot
wcasdf this will also useful for desire user, i have pushed reboot into /system/bin but didnt sames to work
desire /system is /dev/block/mtdblock3, this is the problem?
Sorted....
Kali- said:
wcasdf this will also useful for desire user, i have pushed reboot into /system/bin but didnt sames to work
desire /system is /dev/block/mtdblock3, this is the problem?
Click to expand...
Click to collapse
Absolutely right Kali........the mtdblock3 resolved the issue.....now able to enter recovery mode and also back up rom.....
Brilliant....many thanks......
watzone69 said:
I guess TheBiles and I were posting in the wrong sub-forum?
http://forum.xda-developers.com/showthread.php?t=695978
Click to expand...
Click to collapse
I was just afraid the thread would get moved with these super-strict mods in this board.
-------------
Sent from my HTC EVO 4G using Tapatalk Pro.
Worked great. Now the reboot commands in ROM Manager and Quick Boot work.
tells me reboot file is not there its in the androidsdk\tools folder
Sporkman said:
tells me reboot file is not there its in the androidsdk\tools folder
Click to expand...
Click to collapse
adb push is pretty versatile, you can give it absolute paths. if you downloaded the reboot file to a different directory, example:
adb push c:\downloads\reboot /system/bin/reboot
hope that helps!
OP: where did this reboot binary come from?
im running PC36IMG.zip and reboot recovery and reboot bootloader both work in normal android mode ...
joeykrim said:
adb push is pretty versatile, you can give it absolute paths. if you downloaded the reboot file to a different directory, example:
adb push c:\downloads\reboot /system/bin/reboot
hope that helps!
OP: where did this reboot binary come from?
im running PC36IMG.zip and reboot recovery and reboot bootloader both work in normal android mode ...
Click to expand...
Click to collapse
i dropped the file in C:\androidsdk\tools WHERE it needs to be
trying to figure this for my desire i understand block needs to be 3 and the rest the same but
keep getting device or resource busy when trying the mount command?
fixed it..you need to be in recovery before doing the above-otherwise you get a resource busy message
dont forget to change to block3 not 4 if using desire- rom manger now works as it should !! thanks
joeykrim said:
...OP: where did this reboot binary come from?
Click to expand...
Click to collapse
I'm not the OP but I originally got mine from the Hero sub-forum:
http://forum.xda-developers.com/showpost.php?p=5356050&postcount=623

how to unroot my nexus s pls help

hello,
i need help to remove superuser and lock my nexus s
+after doing that should i get official updates?
i did see this topic
http://forum.xda-developers.com/showthread.php?t=879041
and i try this solution
ryude said:
You need to use adb to go in the file system and delete all trace of superuser and busybox. That is the only things rooting does, places those files on your phone and changes file permissions. File permissions, they won't look for, but I've had best buy scroll through the app drawer on multiple occasions looking for superuser/rom manager.
I have attached a zip containing all the files needed for adb. Since they no longer package adb with the sdk. Just open command prompt and cd to the directory containing adb. Make sure your phone has Usb Debugging enabled, then connect your phone.
You might need to download usb drivers in order for windows to recognize the device, but probably not. Once your phone is connected, do the following.
Code:
adb devices
adb shell
su
rm /system/app/Superuser.apk
rm /system/bin/su
rm /system/bin/busybox
rm /system/bin/rootshell
reboot
Click to expand...
Click to collapse
but when i write rm /system/app/Superuser.apk it say
Read-only file system
so what should i do i only get my XS unlock then install superuser using
install-superboot-windows.bat
and i never do recovery!!!!!!
so any help
i need to get my nexus like new and i should then gt updates
You can have superuser and get updates. The update will remove root though. You could always wait for the cm nightly to include 2.3.3
Sent from my Nexus S using XDA App
You have to mount the /system partition as read/write.
Easiest way is use Root Explorer.
You can also try the following from adb or terminal on the phone:
Code:
su
mount -o rw,remount /dev/block/mtdblock3 /system
thanks for your reply
i used Root Explorer to mount the /system partition as read/write.
and then
i did write this codes
adb devices
adb shell
su
rm /system/app/Superuser.apk
and every thing was ok
but i have an error on those lines
rm /system/bin/su
rm /system/bin/busybox
rm /system/bin/rootshell
and every time i get file not found
so what i should do???
hello, tominater12 and thank you for reply
cold you tell me how i can remove superuser and root using the update??????
i want to get my nexus s like new no root no superuser
so any one can help?
hi guys,
this is my first post in the forums, but after reading and watching many videos on how to remove it i have found a solution...my nexus s is now unrooted with no superuser...
make sure u have android sdk installed, and have usb debugging on.
restart phone into recovery
open cmd and type -
cd c:/AndroidSDK/tools/
adb shell mount /system
adb shell rm /system/app/Superuser.apk
ALL CREDITS GO TO 'TheUltraLinx' ON YOUTUBE,
who has fixed my phone to factory settings
flash oem rom and fastboot oem unlock?

[Q] /System/App Permissions

I've been working on my /System/App folder with root access and I changed the permissions to R/W, R and R. Afterwards, the device freezes at the AT&T screen, looping at the stage where it loads certain apps. It attempts to load them, but because it can't access them due to permissions, they freeze and then force close. I'm rooted and have CWM installed, so I have ADB access. I'm using the UCLD2 ICS build, and my question is this:
I know that it's possible to change the permission of folders in the root folder using chmod, but I've had no luck with this so far.
Using ADB shell, and these are the commands that I've been using:
adb shell
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
chmod 755 /system/app
I've got it mounted, but when I chmod, it tells me "No such file or directory"
If I can change the permissions on the /system/app folder back to the way it was, my phone'll be fine, but right now, fixing permissions doesn't solve the problem, and I'm stuck in loop for now. Any thoughts would be appreciated. I've read through multiple forums and the closest I came to finding my problem was with the Kindle Fire forum, and I've been trying to carbon copy the solution from that forum. http://forum.xda-developers.com/showthread.php?t=1389728
Any help would be appreciated =)
Sorry for the post...I answered my own question. I rebooted recovery and restarted adb.
I ran this as follows:
adb root
adb remount
adb shell chmod 777 /system/app
This did it!
Sorry about the spam on the thread =)

[Build.Prop] Xperia L

Hi there
I was messing with my build.prop to tweak and test it on my ROM and I got bootloop. I had to flash system again via ftf as I didnot make a backup on my PC. However, there are many ways to edit/flash build.prop again and thus if anyone of you have a problem while editing build.prop you can write it back to your device using ADB Shell commands.
Run Command Prompt where you have adb. You must have drivers installed properly. For drivers check into my forum :
http://forum.xda-developers.com/showthread.php?t=2493042
adb pull /system/build.prop C:\Users\user\Desktop
User is your user name on PC. You may copy it anywhere else by changing the location of the file.
"build.prop" on your desktop should appear. Open it with using a wordpad. Change what ever you want to.
adb push C:\Users\user\Desktop\build.prop /sdcard/build.prop
This will copy the build.prop on your sd card
ADB remount
ADB push c:\build.prop /system/ depending where your file is. In this case, I am trying to mount directly from C:/ to phone. If this doesnot work, you should use the above command to copy it in sdcard and then try to push it from sd card.
If suppose that doesnot work either, use adb shell
adb shell
A shell is used to run commands.
su mount -o remount,rw none /system
busybox cp /sdcard/build.prop /system/build.prop
mount -o remount,ro none /system
You are done ! Good Luck
UPDATE
I am unable to reach device using adb commands. Anyone who knows how can i push build.prop when my adb is not working and my phone is bootlooped

Cannot Mount system/app rw

I am rooted with magisk and using the follow command to mount /system rw
Code:
adb shell "su -c 'mount -o rw,remount /system'"
I can copy to system/priv-app using:
Code:
adb shell "su -c 'cp sdcard/name.apk system/priv-app/name/name.apk'"
But using this same command I cannot copy to system/app
Code:
adb shell "su -c 'cp sdcard/name.apk system/app/name/name.apk'"
I get the error:
cp: system/app/name/name.apk: Read-only file system
Click to expand...
Click to collapse
What am I doing wrong?
These days, you really don't want to try to modify the distribution filesystems directly. I'm pretty certain that newer ones are compacted/compressed, so there's no room to add anything, anyway. Look into Magisk modules, and do it that way.
creeve4 said:
I am rooted with magisk and using the follow command to mount /system rw
I can copy to system/priv-app using:
But using this same command I cannot copy to system/app
I get the error:
What am I doing wrong?
Click to expand...
Click to collapse
If you're on Android 10 you can't modify system, vendor or product at all due to the pixel phones using logical partitions now. Pretty much if you want to modify anything you must use magisk modules (or you can use /sbin/.magisk/mirror/ but I don't recommend that)
Sent from my Google Pixel 3a XL using XDA Labs
I appreciate the responses, and I understand what you are each saying.
I'm running a custom build of DU pie. I am making modifications and frequently pushing the apks to my phone. It's tedious to push and then have to use a file explorer on my phone to manually move the apk to the correct folder. I am looking for the correct way to mount all /system folders rw so I can script the apk transfer.

Categories

Resources