عرض مشاركة واحدة
قديم 15-06-2012, 05:20 AM   #82
DR.AKRIM
خبير نظام Android
 
الصورة الرمزية DR.AKRIM
 
تاريخ التسجيل: 12-09-2010
الدولة: السعودية
المشاركات: 832
مشاركات الشكر: 1,041
شكر 4,233 مرات في 592 مشاركات

الاوسمة التي حصل عليها

اقتباس:
المشاركة الأصلية كتبت بواسطة مساعد25 مشاهدة المشاركة
اخوي وانام لاينقني بجهاز الجلكسي 3 الا ميزة يو اس بي ماس ستورج هل هناك امكانية لأضافتها في رومك القادم
اخي ونام انا عندي الحل لتحويل
MTP <-> Mass Storage

ولكن لا يوجد لدي الوقت الكافي لعملها اذا كان لديك وقت تفضل الحل

from android ICS supports MTP.
Let's modify the way the Mass Storage Gingerbread.


framework-res.apk/ res / xml / storage_list.xml is


<StorageList Xmlns:android="http://schemas.android.com/apk/res/android">
<! - Removable is not set in nosdcard product ->
<Storage android: mountPoint = "/ mnt / sdcard"
android: storageDescription = "@ string / storage_usb"
android: primary = "true"
android: emulated = "true"
android: mtpReserve = "100" />
</ StorageList>

Replace as follows.



<StorageList Xmlns:android="http://schemas.android.com/apk/res/android">
<! - Removable is not set in nosdcard product ->
<Storage android: mountPoint = "/ mnt / sdcard"
android: storageDescription = "@ string / storage_internal"
android: primary = "true"
android: emulated = "false"
android: allowMassStorage = "true" />
</ StorageList>

init. [PRODUCT_NAME]. rc

Delete the relevant portions of fuse.



on post-fs-data
# We will remap this as / mnt / sdcard with the sdcard fuse tool
mkdir / data / media 0775 media_rw media_rw
chown media_rw media_rw / data / media


on fs
mount ext4 ...
mount ext4 ...
mount ext4 ...
setprop ro.crypto.fuse_sdcard true

# / Sdcard

export EXTERNAL_STORAGE / mnt / sdcard
mkdir / mnt / sdcard 0000 system system
symlink / mnt / sdcard / sdcard



# Create virtual SD card at / mnt / sdcard, based on the / data / media directory
# Daemon will drop to user / group system / media_rw after initializing
# Underlying files in / data / media will be created with user and group media_rw (1023)
service sdcard / system / bin / sdcard / data / media 1023 1023
class late_start

init. [PRODUCT_NAME]. usb.rc


on property: sys.usb.config = mtp
write / sys/class/android_usb/android0/enable 0
.
.
setprop sys.usb.state $ sys.usb.config

on property: sys.usb.config = mtp, adb
.
.
start adbd

Replace the mass_storage mtp.

And vold.fstab create


# # Vold 2.0 Generic fstab
# # - San Mehat (san@android.com)
# #

# # # # # # # # # # # # # # # # # # # # # # #
# # Regular device mount
# #
# # Format: dev_mount <label> <mount_point> <part> <sysfs_path1...>
# # Label - Label for the volume
# # Mount_point - Where the volume will be mounted
# # Part - Partition # (1 based), or 'auto' for first usable partition.
# # <sysfs_path> - List of sysfs paths to source devices, must start with '/' character
# # Flags - (optional) Comma separated list of flags, must not contain '/' character
# # # # # # # # # # # # # # # # # # # # # #


dev_mount sdcard / mnt / sdcard auto [vfat mount to node] nonremovable, encryptable


And in BoardCongig.mk or device.mk vold.fstab adds a sentence to copy.

PRODUCT_COPY_FILES + = \
device/hardkernel/odroida4/vold.fstab: system / etc / vold.fstab \
.

changes to the mass_storage persist.sys.usb.config = mtp.


# Set default USB interface
PRODUCT_DEFAULT_PROPERTY_OVERRIDES + = \
persist.sys.usb.config = mass_storage




With this modification, the ICS can also view the screen of Gingerbread.



المصدر
Google Translate
DR.AKRIM غير متصل   رد مع اقتباس
عدد 6 من الاعضاء يشكرون DR.AKRIM على مشاركته الطيبة ويطلبون المزيد من هذه المشاركات الرائعة ويدعون له بالتوفيق
مشاهدة/اخفاء قائمة الشكر لهذه المشاركة

اعلان