adb sync system + lack of memory

2,009 views
Skip to first unread message

Akash Ramani

unread,
Apr 11, 2012, 8:15:17 AM4/11/12
to android-...@googlegroups.com
I'm no expert on building and pushing code into the device, this infact is the first time that i'm doing it.

Executing "adb sync system -p <path to the out target>" started executing perfectly and suddenly said it ran out of memory. As far as i know the partition size is 280Mb on the device, and the size of all the files in the system folder of the build output is about 150Mb.

But it stops half way through and says there isn't enough memory. What do i do? Can i delete the entire /system folder and then sync it? or am i supposed to do something else?

Magnus Bäck

unread,
Apr 11, 2012, 10:46:32 AM4/11/12
to android-...@googlegroups.com
On Wednesday, April 11, 2012 at 08:15 EDT,
Akash Ramani <aka...@gmail.com> wrote:

What's the exact error message? Copy the terminal output.

You can use "adb shell df" to check the size and free space of all
partitions.

--
Magnus B�ck
ba...@google.com

Dianne Hackborn

unread,
Apr 11, 2012, 8:57:54 PM4/11/12
to android-...@googlegroups.com
If you are updating a lot of things, you really should use "fastboot flashall" to reflash the system image.

If you are using sync for changes to any core parts of the platform, be sure to do "adb shell stop" before so that the system isn't running while doing so.

If you are changing any lower-level files, I'd really recommend doing this with a flashall.

Note that because of how Linux filesystem semantics work, if a file is open when you replace it, the storage used by the old file will stay in use until all clients have closed it.  So if you try to do an adb sync on top of a running system, you can end up with many files being kept around unlinked because some processes still have the old file open.  For example, if you sync frameworks.jar, you will change what is on storage the next time you open it, but the system will still be running with the contents of the old file.

Basically I suggest only using "adb sync" when you know what changes you have made and that there is a handful of files being changed.

Also adb sync will not delete files, so if there has been any change in the set of files you should use fastboot flashall to make sure your system partition matches what you have built.

--
You received this message because you are subscribed to the "Android Building" mailing list.
To post to this group, send email to android-...@googlegroups.com
To unsubscribe from this group, send email to
android-buildi...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en



--
Dianne Hackborn
Android framework engineer
hac...@android.com

Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails.  All such questions should be posted on public forums, where I and others can see and answer them.

Akash Ramani

unread,
Apr 13, 2012, 5:01:35 AM4/13/12
to android-...@googlegroups.com
Thank you for the info Dianne! This was precisely the guidance i was seeking for!

I think the terrible mistake i made was not doing "adb shell stop"!

Also, i understand what you mean by how the memory is handled now!

The only reason why i'm not using fastboot is BECAUSE fastboot is not recognizing my device(allwinner a10 based) :( If it did, that would have been my first option.

On Thursday, April 12, 2012 6:27:54 AM UTC+5:30, Dianne Hackborn wrote:
If you are updating a lot of things, you really should use "fastboot flashall" to reflash the system image.

If you are using sync for changes to any core parts of the platform, be sure to do "adb shell stop" before so that the system isn't running while doing so.

If you are changing any lower-level files, I'd really recommend doing this with a flashall.

Note that because of how Linux filesystem semantics work, if a file is open when you replace it, the storage used by the old file will stay in use until all clients have closed it.  So if you try to do an adb sync on top of a running system, you can end up with many files being kept around unlinked because some processes still have the old file open.  For example, if you sync frameworks.jar, you will change what is on storage the next time you open it, but the system will still be running with the contents of the old file.

Basically I suggest only using "adb sync" when you know what changes you have made and that there is a handful of files being changed.

Also adb sync will not delete files, so if there has been any change in the set of files you should use fastboot flashall to make sure your system partition matches what you have built.
On Wed, Apr 11, 2012 at 5:15 AM, Akash Ramani <aka...@gmail.com> wrote:
I'm no expert on building and pushing code into the device, this infact is the first time that i'm doing it.

Executing "adb sync system -p <path to the out target>" started executing perfectly and suddenly said it ran out of memory. As far as i know the partition size is 280Mb on the device, and the size of all the files in the system folder of the build output is about 150Mb.

But it stops half way through and says there isn't enough memory. What do i do? Can i delete the entire /system folder and then sync it? or am i supposed to do something else?

--
You received this message because you are subscribed to the "Android Building" mailing list.
To post to this group, send email to android-building@googlegroups.com

To unsubscribe from this group, send email to

For more options, visit this group at
http://groups.google.com/group/android-building?hl=en
Reply all
Reply to author
Forward
0 new messages