write to /data via ADB without root? - Moto 360 2015

Hi, i have a small question:
Do we have write access to /data with ADB and without root on our Moto360?
I would like to test some things but obviously we don't have root access yet.
I believe i have seen someone using a custom build.prop on the /data partition instead of /system partition years ago.
My goal is to "replace" the ro.ambient.low_bit_enabled=true line with a custom build.prop on the /data partition.
I believe this is possible, but i don't remember if i need root to write the /data partition.
Thanks in advance!

Related

[Q] Application/Data partition resize?

Hi.
I've rooted my A70s with chulri's kernel and it seems to work ok.
My next goal is to get more app room ... so I guess I need to resize the app/data partition.
I've thought that having my internal storage formatted on ext4, it would be possible to ln the /data folder to /storage/data without problems, but then I should create a boot script for that. The question is... can I do this with my current root status? What would be the way to do it? I'm don't know enough of linux os to make it on my own.
If the system can't be fooled with a ln, then is there any way to resize the data partition, even if I have to backup/restore my current data?
I don't want to use Urukdroid, since all the versions I tried were very unstable on my machine.
Cheers!!
search the forum: http://forum.xda-developers.com/showthread.php?p=14710945#post14710945
Follow chulri's method, or repartition your internal storage in Linux, mount it on the archos, and copy the data there. Then edit init.rc and change the data mount line. If it gets mounted in the kernel, you'll have to umount it first to remount it to the other partition.

Boot Manager for the Optimus V

Anyone know if this will work on the Optimus V?
http://lifehacker.com/5826050/how-to-dual-boot-multiple-roms-on-your-android-phone
I don't know, but it looks like it does the same thing we do in recovery. Plus I think you would still have to restore all of your apps. Might as well just boot into recovery and do it the old fashioned way.
Sent from my LG-VM670 using XDA App
You only have to restore once. And as far as I know, it doesn't work for the v yet. (I tried). If someone gets it to work it would be awesome to get a tut.
"device name is found in your build.prop which is at /system/build.prop its at the line ro.product.build= and whatever that's equal to is your device name
the rest you need adb shell and need to reboot to recovery then type these mount your sdcard (to the phone not the computer) data system and cache then type the command "mount" without the quotes and look for the line in sdcard for /dev/block/something and that is what your sdcard block is
Next in adb shell still in recovery type the command "df -h" without the quotes and get the size of data system and cache and put them in and that's it you have unofficial support"
YThis is what one of the devs told me if anyone cares to try and post results.
Ya, I did all of that. My problem comes when trying to figure out which number is which.. Like is data your sd card and so on
Anyone willing to help me figure out which is which?
BigChillin said:
Anyone willing to help me figure out which is which?
Click to expand...
Click to collapse
here you go.
Filesystem Size Mounted on
/dev/block/mtdblock5 164.5M /system
/dev/block/mtdblock6 178.9M /data
/dev/block/mtdblock1 110.1M /cache
or, if you need more exact numbers:
Filesystem 1K-blocks Mounted on
/dev/block/mtdblock5 168448 /system
/dev/block/mtdblock6 183168 /data
/dev/block/mtdblock1 112768 /cache
I don't mind running the numbers for you but I don't want to help port that software.
I was considering making a multiboot recovery, but haven't decided it's worth my while for the time it'd take to refine enough to release.
edit: oh, yeah: android mounts the sdcard at /dev/block/vold/179:1
you can also access it from /dev/block/mmcblk0p1 (although the 0 increases by 1 every time you remove and replace the SD card until rebooting.)
will this work at optimus me?

Mounting the second partition of SDCARD as internal memory

Alright so here's the deal, my internal SDCARD is corrupted and the /data partition is unusable.
My device is i9003 and it's running on MIUI at the moment. By default MIUI didn't detect my external SD or my internal SD but after editing "vold.fstab" I was able to mount the first partition of my external SDCARD as external memory and everything was good, I could finally use the camera and pretty much do everything else.
But I was still unable to mount the second partition of my external SDCARD as my internal memory which meant none of my messages could be saved and the phone would pretty much go back to factory settings after a reboot, this apparently is because the /data partition (present on the internal memory) stores all the user data such as the time, the theme I'm using, etc and not having a /data partition meant none of these settings were really saved.
Having no internal memory also means I cannot install any apps such as Link2SD.
Moving on, after many hours of googling I found out that it might not be possible to mount the internal memory using "vold.fstab" and the only way to do it could be by mounting the memory manually during init.
So here's what I want again, I want to use the second partition of my external SDCARD as internal memory, this is likely to solve all my problems and make my phone usable again.
Thanks for all the help, appreciate it.
You need to edit /init.rc (or init.vendor.rc). To make the edits here stay, you'll need to create a new boot.img to flash your device with.
Have a look at an extract of mine init.<vendor>.rc:
Code:
on fs
# mount mtd partitions
# Mount /system rw first to give the filesystem a chance to save a checkpoint
#mount yaffs2 [email protected] /system
#mount yaffs2 [email protected] /system ro remount
# Use below two lines instead of above to run /system from SDcard instead of internal flash
mount ext3 /dev/block/mmcblk0p3 /system
mount ext3 /dev/block/mmcblk0p3 /system ro remount
#mount yaffs2 [email protected] /data nosuid nodev
mount ext3 /dev/block/mmcblk0p4 /data nosuid nodev
mount yaffs2 [email protected] /cache nosuid nodev
Compare the lines I've commented out with the others. Here both /data and /system resides on the SDcard, you only need to care about /data. Also remember your device nodes may not be named "mmcblk0p3" etc.
But you'll need to make those changes in the initramfs in your flashed boot.img to make them stay.
kuisma said:
You need to edit /init.rc (or init.vendor.rc). To make the edits here stay, you'll need to create a new boot.img to flash your device with.
Have a look at an extract of mine init.<vendor>.rc:
Code:
on fs
# mount mtd partitions
# Mount /system rw first to give the filesystem a chance to save a checkpoint
#mount yaffs2 [email protected] /system
#mount yaffs2 [email protected] /system ro remount
# Use below two lines instead of above to run /system from SDcard instead of internal flash
mount ext3 /dev/block/mmcblk0p3 /system
mount ext3 /dev/block/mmcblk0p3 /system ro remount
#mount yaffs2 [email protected] /data nosuid nodev
mount ext3 /dev/block/mmcblk0p4 /data nosuid nodev
mount yaffs2 [email protected] /cache nosuid nodev
Compare the lines I've commented out with the others. Here both /data and /system resides on the SDcard, you only need to care about /data. Also remember your device nodes may not be named "mmcblk0p3" etc.
But you'll need to make those changes in the initramfs in your flashed boot.img to make them stay.
Click to expand...
Click to collapse
Thanks for the reply man, mind telling me the how I can go about doing this?, I've got the ROM I flashed via CWM here with me, I could send it over to you if that would make things easier for you.
EDIT: would pulling init.rc via ADB, making the changes and pushing it back do the trick? or do I have to go for the boot.img? In case it's the latter, I'm going to need help doing it.
PhantomPhreek said:
Thanks for the reply man, mind telling me the how I can go about doing this?, I've got the ROM I flashed via CWM here with me, I could send it over to you if that would make things easier for you.
Click to expand...
Click to collapse
You'll find a good tutorial about how to work with boot images here: http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack,_Edit,_and_Re-Pack_Boot_Images
If you already got the ROM in a file, this should be easy! Got ADB and FASTBOOT as well?
kuisma said:
You'll find a good tutorial about how to work with boot images here: http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack,_Edit,_and_Re-Pack_Boot_Images
If you already got the ROM in a file, this should be easy! Got ADB and FASTBOOT as well?
Click to expand...
Click to collapse
I'm not sure I've got FASTBOOT but I've definitely got ADB and I've also got the ROM. Would pulling init.rc via ADB, making the changes and pushing it back do the trick? or do I have to go for the boot.img?.
PhantomPhreek said:
I'm not sure I've got FASTBOOT but I've definitely got ADB and I've also got the ROM. Would pulling init.rc via ADB, making the changes and pushing it back do the trick? or do I have to go for the boot.img?.
Click to expand...
Click to collapse
No. You need to reboot the phone for the init.rc script to execute, and once you reboot the phone, the root file system is overwritten by the flashed image ... Catch 22.
You'll NEED to create a new boot.img with a new initramfs containing your changes.
kuisma said:
No. You need to reboot the phone for the init.rc script to execute, and once you reboot the phone, the root file system is overwritten by the flashed image ... Catch 22.
You'll NEED to create a new boot.img with a new initramfs containing your changes.
Click to expand...
Click to collapse
Shucks, this explains why it didn't work. Alright, so I extract boot.img from the rom, follow the tutorial.What is it that I have to edit again? "/init.rc" or "init.<vendor>.rc"?.
Thanks for the help man, appreciate it.
EDIT: Looks like the tutorial is meant for Linux, I'm currently on Windows. I might be asking for a lot here but is there any chance I could get you to do it for me?
PhantomPhreek said:
Shucks, this explains why it didn't work. Alright, so I extract boot.img from the rom, follow the tutorial.What is it that I have to edit again? "/init.rc" or "init.<vendor>.rc"?.
Thanks for the help man, appreciate it.
Click to expand...
Click to collapse
Of course, MIUI may have some boot hooks you could use to re-mount /data after boot. I know nothing about that ROM. Also keep in mind that each time you update the ROM, you have to remake this edit.
Also, no idea what MIUI calls its init.rc, you'll just have to see for yourself. If you've got the mount commands in init.rc, fine. Else look elsewhere.
A good first step would to make sure you really are able to flash a new boot.img. Download fastboot and verify your device understands it. Else you have to use some proprietary flash program, and I'm not familiar with Samsungs bootloaders at all. Ask in the Samsung forum if so.
kuisma said:
Of course, MIUI may have some boot hooks you could use to re-mount /data after boot. I know nothing about that ROM. Also keep in mind that each time you update the ROM, you have to remake this edit.
Also, no idea what MIUI calls its init.rc, you'll just have to see for yourself. If you've got the mount commands in init.rc, fine. Else look elsewhere.
A good first step would to make sure you really are able to flash a new boot.img. Download fastboot and verify your device understands it. Else you have to use some proprietary flash program, and I'm not familiar with Samsungs bootloaders at all. Ask in the Samsung forum if so.
Click to expand...
Click to collapse
Looks like the tutorial is meant for Linux, I'm currently on Windows. I might be asking for a lot here but is there any chance I could get you to do it for me?. ADB and I do see the file init.rc and I also see the mount commands as well. I used adb shell to run the command you sent over with a few edits for second partition and it does mount but as you said, it all goes away after reboot.
PhantomPhreek said:
Looks like the tutorial is meant for Linux, I'm currently on Windows. I might be asking for a lot here but is there any chance I could get you to do it for me?. ADB and I do see the file init.rc and I also see the mount commands as well. I used adb shell to run the command you sent over with a few edits for second partition and it does mount but as you said, it all goes away after reboot.
Click to expand...
Click to collapse
Hmm... are you even able to create a second ext3 partition on the SDcard using Windos..?
kuisma said:
Hmm... are you even able to create a second ext3 partition on the SDcard using Windos..?
Click to expand...
Click to collapse
haha, I used CWM to create the partitions initially, but then I used a software called MiniTool, works well. Can I get you to to do it?
PhantomPhreek said:
Alright so here's the deal, my internal SDCARD is corrupted and the /data partition is unusable.
Click to expand...
Click to collapse
The ROM you are using requires an ext4 partition as partition #3 of the SDcard. This is mounted as /data. Repartition your SDcard #1 as FAT, #2 whatever, and #3 as ext4, and everything will work as intended. :victory:
I guess you've missed this in the ROM documentation ...
kuisma said:
The ROM you are using requires an ext4 partition as partition #3 of the SDcard. This is mounted as /data. Repartition your SDcard #1 as FAT, #2 whatever, and #3 as ext4, and everything will work as intended. :victory:
I guess you've missed this in the ROM documentation ...
Click to expand...
Click to collapse
Wah~ really?, I'll try that and get back here with the results. Thanks a lot!.
EDIT: Is it FAT or FAT32?
PhantomPhreek said:
Wah~ really?, I'll try that and get back here with the results. Thanks a lot!.
EDIT: Is it FAT or FAT32?
Click to expand...
Click to collapse
FAT32.
kuisma said:
FAT32.
Click to expand...
Click to collapse
Tried but didn't work out. I made three partitions, all primary - #1 FAT32, #2 FAT32, #3 EXT4. Plugged the SDCARD in and the external memory was detected as usual, but not the internal memory.
I tried changing the time, it was reset back after reboot.
After that I left the SDCARD as is and flashed the ROM again and now, neither the internal nor the external memory are detected. This is probably because the "vold.fstab" which was edited by me, was overwritten on re flashing.
I'm at a dead end, any ideas?
PhantomPhreek said:
Tried but didn't work out. I made three partitions, all primary - #1 FAT32, #2 FAT32, #3 EXT4. Plugged the SDCARD in and the external memory was detected as usual, but not the internal memory.
I tried changing the time, it was reset back after reboot.
After that I left the SDCARD as is and flashed the ROM again and now, neither the internal nor the external memory are detected. This is probably because the "vold.fstab" which was edited by me, was overwritten on re flashing.
I'm at a dead end, any ideas?
Click to expand...
Click to collapse
Attach an output of "df", "mount", the file "/init.latona.rc" and "/etc/vold.fstab" here, and I'll have a look at it. Hmm... include the output of "dmesg" as well, to be on the safe side.
kuisma said:
Attach an output of "df", "mount", the file "/init.latona.rc" and "/etc/vold.fstab" here, and I'll have a look at it. Hmm... include the output of "dmesg" as well, to be on the safe side.
Click to expand...
Click to collapse
What bugs me is the fact that the external SD is not detected, from what little knowledge I have, external SD is unrelated to the internal SD which I currently have problems with, meaning it should be detected without a problem.
Also I have to add, CWM doesn't detect my external SD right away, when I go to recovery and go over to "Choose zip from sdcard" it says "E:Can't mount /sdcard/". The solution I've found coincidentally is to go to "mounts & storage", mount "/emmc", pull the SDCARD out plug it in again and then "mount /sdcard" this works perfectly and I'm able to flash roms from the sdcard.
One problem at a time, please. Attach the files I requsted, so we can determine why /data failes to mount. Looking at your ROM:
Code:
$ grep " /data$" init.latona.rc
mount ext4 /dev/block/mmcblk0p3 /data
I want to know why this fails, and I guess the answer is in the dmesg output. And please before I'll get another whiskey.
kuisma said:
One problem at a time, please. Attach the files I requsted, so we can determine why /data failes to mount. Looking at your ROM:
Code:
$ grep " /data$" init.latona.rc
mount ext4 /dev/block/mmcblk0p3 /data
I want to know why this fails, and I guess the answer is in the dmesg output. And please before I'll get another whiskey.
Click to expand...
Click to collapse
I can't seem to find "/init.latona.rc" everything else you requested I've mailed them over already
EDIT: the dmesg output is AFTER I mounted "/sdcard" manually as explained in my previous post.
PhantomPhreek said:
I can't seem to find "/init.latona.rc" everything else you requested I've mailed them over already
EDIT: the dmesg output is AFTER I mounted "/sdcard" manually as explained in my previous post.
Click to expand...
Click to collapse
The files you mailed me does not correspond to the ROM you refereed.
The /etc/fstab show that /data is mounted as an rfs file system, not ext4. So either format partition #3 on the sdcard as rfs (Samsung proprietary), or edit /etc/fstab and change "rfs" to "ext4". I'd prefer the later, assuming your kernel supports ext4. Else use ext3.
Code:
/dev/block/mmcblk0p3 /data rfs rw
But you can't have flashed the ROM you told me you did. It excepted an ext4 file system ...

/data (mmcblk0p8) filesystem format on KatKiss v30

Hello all,
I'm hoping someone can help me with this. Long story short, I've bricked my Prime. I was running TWRP recovery (AndroWook, so 2.6.something?) and KatKiss v30 when things went south... but unbricking is for another day.
I'm more interested in getting some data that didn't make it into my last backup off the /sdcard. I don't have access to the device itself (adb or fastboot, haven't tried APX yet), but I did managed to take an image of /dev/block/mmcblk0p8 via the dd command.
The problem is I can't mount it as a loop device in Linux. The problem that started all this was that KatKiss wouldn't boot... the output of "fdisk -l /dev/block/mmcblk0" suggested that its partition table was corrupted or gone.
Various suggestions on XDA and elsewhere (xmount, kpartx, etc.) haven't allowed me to mount this backup image... I'm wondering if the missing partition table isn't the issue.
[email protected]:~/prime_backup_microsdcard_32G_20151227$ sudo mount -t auto -o
loop tf201-mmcblk0p8.img /mnt
NTFS signature is missing.
Failed to mount '/dev/loop3': Invalid argument
The device '/dev/loop3' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?
So my thought is to try the following:
1. Create a virtual HD of >27.GB (the size of the backup image).
2. Create a partition of the exact size/dimensions as the backup I have, and ensure I'm able to mount it.
3. Restore the backup to this partition using dd.
4. Profit.
Does this make sense, and if so, what format is /dev/block/mmcblk0p8? Based on the steps to install KatKiss I would have guessed f2fs, but the mount error above makes me think otherwise.
Thanks in advance for your help.
ACP

Delete android recovery system and use the space otherwise?

Hello,
Would it theoretically possible to delete the recovery system of android and use the space for example for data?
I mean, if you have SPflashtool, you would not need the android recovery, becuase you can flash the phone over pc,
if something is broken on the firmware, so why not deleting it, and use the space the recovery takes normally for other purposes?
Is the recovery system only needed for recovery, or has it other functions too (Booting the normal system for example)?
@Rufus0700
Partitions aren't resizeable on Andoid A-only devices, hence by deleting the mentioned /recovery partition one doesn't gain storage space that can get added/merged to another partition, for example /data partition.
jwoegerbauer said:
@Rufus0700
Partitions aren't resizeable on Andoid A-only devices, hence by deleting the mentioned /recovery partition one doesn't gain storage space that can get added/merged to another partition, for example /data partition.
Click to expand...
Click to collapse
But I think it would be possible to edit the partition table BEFORE flashing the ROM on the phone?

Categories

Resources