is there a way to do what ADB can do without a pc? - G1 Android Development

Im trying to push a new browser to a system directory, but i dont have access to a pc at the moment. Can i achieve this without using a pc? Possibly through terminal emulator?

Yes, it's possible.
Code:
su
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
cp /sdcard/Contacts.apk /system/app/Contactcs.apk
and reboot.
For those wondering what the command means:
su = superuser...gives root privileges
mount = the command to mount drives as devices
-o rw,remount = sets options for remounting the drive as read/write (not read-only)
-t yaffs2 = tells the OS that the partition is yaffs2 format (rather than fat or ext2)
/dev/block/mtdblock3 = the device node for the partition
/system = the human-accessible mount point for the partition
cp = copy

didnt work. Mind you i tried to install the H build contacts.apk to G build, and im not sure if its really possible to do it.
when its all said and done, it shows a "broken link icon" and when you go to it, it says "application is not installed on your phone"

suggestion
It may not have worked because u have to move the contacts.apk first? Is there a line of code to move the original browser.apk to a directory for safety, then move the one from the sdcard into that spot?

I think this has been discussed before somewhere on here. The H contacts app depends on some other HTC things being installed to work.
The OP was asking about the browser, not contacts. The commands I gave do work. But you need more than just the Contacts.apk to get full functionality.
I was just showing that it *is* possible to do adb actions without adb or a pc. Sorry if using "Contacts.apk" in the example code confused anyone.

Related

Sometimes impossible to mount system partition ?

How to explain that it is impossible to mount the system partition in recovery ? Should I format my sd card to correct that ?
the /system/ files do not reside in your sd card. They are stored in your phone. Are able to boot up your phone at all? If so you can mount it via a terminal app. You might also need busybox installed. At the terminal type the following
$ su
# mount -o rw,remount -t yaffs2 /dev/block/mtdblock1 /system

[Q] Can't mount /system as r/w

Have an HTC hero with CM7 stable. Been trying to modify sysctl.conf to increase the speed a little (if thats possible, CM7 is fast). I've used the command in ./adb shell and terminal emulator:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
When I type mount it displays /system as a r/w partition but I still can't edit the sysctl.conf file. When I do try to edit, the shell says that the directory doesn't exist (/ect/sysctl.conf).
Even with simpler commands like "adb pull /system/ect/sysctl.conf /" still come back as directory doesn't exist.
What am I doing wrong? Ultimately if I can want to get the sysctl file to my PC to edit and place back on the phone.
Have you tried using something like Root Explorer? While learning & knowing ADB comes in handy, I find most things are easier through Root Explorer. You can just copy the file to your SD card, then to your computer.
EDIT: On second look, you have /system/ect... instead of /system/etc...
I also believe it should be mtdblock4 instead of mtdblock3, but I could be wrong. I'm not good with this kind of stuff.
Type in mount to see what device is currently mounted as /system...I would just double check
Sent from my Droid using XDA App
This command should also work:
Code:
mount -w -o remount /system /system
I typed mount in cmd. Says that /system is in mtdblock3. I will try root explorer and see if it fixes my woes. Thanks.

[Solution]SAMSUNG GIO S5660: adb remount failed

Hi guys,
If any one getting error while remounting system partition in rw mode using adb, please follow these steps :
C:\Android\android-sdk-windows\tools> adb remount
remount failed: No such file or directory
SOLUTION:
Connect to your device usb adb: [FOR ROOTED DEVICES ONLY]
C:\Android\android-sdk-windows\tools> adb shell
$su
#mount -o remount,rw /dev/stl12 /system
(do your desired work like copy some files on system/media folder , then remount the system partition in ro mode again)
# cd /
#mount -o remount,ro /dev/stl12 /system
#exit
$exit
Thats all
FYI if you want to know the dev partitions mounted on your device :
C:\Android\android-sdk-windows\tools> adb shell
$ su
# mount
cheers
Did you map the other partitions by any chance? I'd like to be able to make a full backup to eventually be flashed back with Heimdall or ODIN. I already have a system.rfs (stock + root) that could be made in a tar image.
I've see tutorials for other Samsung phones but these need to be adapted to our exact setup. I haven't found anything generic enough to know how to go about mapping things.
It might also help those who flashed GT-S5660 ROMs on the Bell Canada GT-S5660M, as the screen brightness issues sound very much like kernel issues to me...
I can't quite tell what the difference is between stl and bml either. (I'll probably try dd'ing the different blocks, except stl5, and peek around with a hex editor...)
Goodbye,
Darkshado

[Q][Kernel]Clemsyn-Blades-3.2 OC v4 on Prime 1.7

From the dev's forum :
- To use Clemsyn-Blades 3.2 OC (v2-4) with PRIME 1.7-final, do following:
Install PRIME 1.7-final
Delete /system/lib/modules/voodoo-sound.ko (eg rename voodoo-sound.bak)
Install Clemsyn-Blades OC kernel
Everything should be fine, voodoo-sound enabled in kernel
Click to expand...
Click to collapse
Forgive my noobness but how do you mount /system in read/write mode instead of read only ?
I tried mount -o rw,remount -t ext4 /dev/block/mmcblk0p1 /system while in root in an adb shell but it screwed the tablet, shut it down and turned it in bootloop...
Can someone script the correct method please ?
Thx
mathmath5151 said:
From the dev's forum :
Forgive my noobness but how do you mount /system in read/write mode instead of read only ?
I tried mount -o rw,remount -t ext4 /dev/block/mmcblk0p1 /system while in root in an adb shell but it screwed the tablet, shut it down and turned it in bootloop...
Can someone script the correct method please ?
Thx
Click to expand...
Click to collapse
This is what I use (because I don't want to try to get all the -o options right, only the ones I know for certain):
$su
# mount -o rw,remount /system
// and after changes
# sync
# mount -o ro,remount /system
# exit
$ exit
...
Hopefully that'll work OK for you. I'm talking about doing this from within terminal emulator, although I'm sure it's the same from adb shell. I just tried it again to be sure.
The idea is that since it's just a change in how it's mounted, it knows everything about how it's mounted already, so just tell it to change the ro/rw flag and to remount. You can see a lot of flags if you just type in # mount | grep system, but entering them correctly and in sequence might be another story.
Good luck -
Disregard
Sent from my Transformer TF101 using Tapatalk
It worked, thanks
Well, method for noobs : use root explorer application
Sent from my Transformer TF101

Finally got root via adb. Now having trouble mounting /system

Back in 5.1.1, I was able to mount the system partition.
Now in 7.0, I couldn't mount it anymore without making my phone crash
I've tried different methods...
Code:
mount -o rw,remount -t ext4 /system
This crashes my phone
Code:
mount -o rw,remount,rw -t ext4 /system
This reports back "...Device or Resource busy"
So then I was thinking that something might be using that directory so I tried to make a system mount point in /mnt, thinking as processes depend on /system, I must make another mount point
So I did, this time, "mount" says system is mounted with "ro,seclabel,relatime,norecovery" as it's option. so when I changed it to "rw,seclabel,relatime,norecovery", it doesn't mount, with no errors
So I tried, with system mounted on /mnt/system,
Code:
# mount -o rw,remount -t ext4 /dev/block/sda18 /mnt/system
(don't worry I know you can do ".../platform/xxxxxxxx.ufs/by-name")
This ALSO crashes my phone
So I pretty much gave up, and looked online, and all I found was the same process, but nothing on "this crashes my phone" or any other.
Agreed
I had the same problem. Hard lock up of phone.
how did u get root via adb??
DDwhite said:
how did u get root via adb??
Click to expand...
Click to collapse
https://forum.xda-developers.com/verizon-galaxy-s6/general/unlock-bootloader-t3688594

Categories

Resources