[DEV]How to compile TWRP touch recovery

All of TWRP 3.x source is public. You can compile it on your own. This guide isn't going to be a step-by-step, word-for-word type of guide. If you're not familiar with basic Linux commands and/or building in AOSP then you probably won't be able to do this. You can currently use Omni 4.4, Omni 5.1, Omni 6.0, CM11.0, CM 12.1, or CM 13.0 source code.Omni 5.1 or Omni 6.0 is recommended. Lately CM keeps making changes that make building TWRP more difficult and they make no effort to work with TWRP. You can build in CM but you may run into a few minor issues. If you don't know how to fix make file issues, then you should choose to use Omni instead. If you are using CM, you'll need to place TWRP in the CM/bootable/recovery-twrp folder and set RECOVERY_VARIANT := twrp in your BoardConfig.mk file.TWRP source code can be found here:
https://github.com/omnirom/android_bootable_recovery
Select the newest branch available. This step is not necessary with Omni because Omni already includes TWRP source by default, however, if you are using an older version of Omni, you will probably want to pull from the latest branch (the latest branch will compile successfully in older build trees)

If you are only interested in building TWRP, you may want to try working with a smaller tree. You can try using this manifest. It should work in most cases but there may be some situations where you will need more repos in your tree than this manifest provides:
https://github.com/minimal-manifest-twrp

BEFORE YOU COMPILE
Note: If you add or change any flags, you will need to make clean or make clobber before recompiling or your flag changes will not be picked up. Now that you have the source code, you'll need to set or change a few build flags for your device(s).Find the BoardConfig.mk for your device. The BoardConfig.mk is in your devices/manufacturer/codename folder (e.g. devices/lge/hammerhead/BoardConfig.mk). Your board config will need to include architecture and platform settings.Usually these are already included if you're using device configs that someone else created, but if you created your own, you may need to add them. Without them, recovery may seg fault during startup and you'll just see the teamwin curtain flash on the screen over and over. We usually put all of our flags at the bottom of the BoardConfig.mk under a heading of #twrp For all devices you'll need to tell TWRP what theme to use.This TW_THEME flag replaces the older DEVICE_RESOLUTION flag. TWRP now uses scaling to stretch any theme to fit the screen resolution. There are currently 5 settings which are: portrait_hdpi, portrait_mdpi, landscape_hdpi, landscape_mdpi, and watch_mdpi. For portrait, you should probably select the hdpi theme for resolutions of 720x1280 and higher. For landscape devices, use the hdpi theme for 1280x720 or higher. TW_THEME := portrait_hdpi

Note that themes do not rotate 90 degrees and there currently is no option to rotate a theme.If you find that the touchscreen is rotated relative to the screen, then you can use some flags (discussed later in this guide) to rotate the touch input to match the screen's orientation. In addition to the resolution, we have the following build flags:

RECOVERY_SDCARD_ON_DATA := true -- this enables proper handling of /data/media on devices that have this folder for storage (most Honeycomb and devices that originally shipped with ICS like Galaxy Nexus) This flag is not required for these types of devices though.If you do not define this flag and also do not include any references to /sdcard, /internal_sd, /internal_sdcard, or /emmc in your fstab, then we will automatically assume that the device is using emulated storage. BOARD_HAS_NO_REAL_SDCARD := true -- disables things like sdcard partitioning and may save you some space if TWRP isn't fitting in your recovery patition
TW_NO_BATT_PERCENT := true -- disables the display of the battery percentage for devices that don't support it properly
TW_CUSTOM_POWER_BUTTON := 107 -- custom maps the power button for the lockscreen
TW_NO_REBOOT_BOOTLOADER := true -- removes the reboot bootloader button from the reboot menu
TW_NO_REBOOT_RECOVERY := true -- removes the reboot recovery button from the reboot menu
TW_NO_USB_STORAGE := true -- removes the USB storage button on devices that don't support USB storage
RECOVERY_TOUCHSCREEN_SWAP_XY := true -- swaps the mapping of touches between the X and Y axis
RECOVERY_TOUCHSCREEN_FLIP_Y := true -- flips y axis touchscreen values
RECOVERY_TOUCHSCREEN_FLIP_X := true -- flips x axis touchscreen values

TWRP_EVENT_LOGGING := true -- enables touch event logging to help debug touchscreen issues (don't leave this on for a release - it will fill up your logfile very quickly)
BOARD_HAS_FLIPPED_SCREEN := true -- flips the screen upside down for screens that were mounted upside-down

There are other build flags which you can locate by scanning the Android.mk files in the recovery source.Most of the other build flags are not often used and thus I won't document them all here. RECOVERY.FSTAB
TWRP 2.5 and higher supports some new recovery.fstab features that you can use to extend TWRP's backup/restore capabilities.You do not have to add fstab flags as most partitions are handled automatically. Note that TWRP does not currently support the "fstab 2" version of fstab files seen in 4.3 or higher.You will still need to use the "old" format of fstab for TWRP (example of that format is below). To maximize TWRP's compatibility with your build tree, you can create a twrp.fstab and use PRODUCT_COPY_FILES to place the file in /etc/twrp.fstab When TWRP boots, if it finds a twrp.fstab in the ramdisk it will rename /etc/recovery.fstab to /etc/recovery.fstab.bak and then rename /etc/twrp.fstab to /etc/recovery.fstab. Effectively this will "replace" the fstab 2 file that your device files are providing with the TWRP fstab allowing you to maintain compatibility within your device files and with other recoveries.
PRODUCT_COPY_FILES += device/lge/hammerhead/twrp.fstab:recovery/root/etc/twrp.fstab
The fstab in TWRP can contain some "flags" for each partition listed in the fstab. Here's a sample TWRP fstab for the Galaxy S4 that we will use for reference:

/boot emmc /dev/block/platform/msm_sdcc.1/by-name/boot /system ext4 /dev/block/platform/msm_sdcc.1/by-name/system /data ext4 /dev/block/platform/msm_sdcc.1/by-name/userdata length=-16384 /cache ext4 /dev/block/platform/msm_sdcc.1/by-name/cache /recovery emmc /dev/block/platform/msm_sdcc.1/by-name/recovery /efs ext4 /dev/block/platform/msm_sdcc.1/by-name/efs flags=display="EFS";backup=1 /external_sd vfat /dev/block/mmcblk1p1 /dev/block/mmcblk1 flags=display="Micro SDcard";storage;wipeingui;removable /usb-otg vfat /dev/block/sda1 /dev/block/sda flags=display="USB-OTG";storage;wipeingui;removable /preload ext4 /dev/block/platform/msm_sdcc.1/by-name/hidden flags=display="Preload";wipeingui;backup=1 /modem ext4 /dev/block/platform/msm_sdcc.1/by-name/apnhlos /mdm emmc /dev/block/platform/msm_sdcc.1/by-name/mdm

Flags are added to the end of the partition listing in the fstab separated by white space (spaces or tabs are fine). The flags affect only that partition but not any of the others. Flags are separated by semicolons. If your display name is going to have a space, you must surround the display name with quotes.

/external_sd vfat /dev/block/mmcblk1p1 flags=display="Micro SDcard";storage;wipeingui;removable

The flags for this partition give it a display name of "Micro SDcard" which is displayed to the user. wipeingui makes this partition available for wiping in the advanced wipe menu. The removable flag indicates that sometimes this partition may not be present preventing mounting errors from being displayed during startup. Here is a full list of flags:
removable -- indicates that the partition may not be present preventing mounting errors from being displayed during boot
storage -- indicates that the partition can be used as storage which makes the partition available as storage for backup, restore, zip installs, etc. settingsstorage -- only one partition should be set as settings storage, this partition is used as the location for storing TWRP's settings file
canbewiped -- indicates that the partition can be wiped by the back-end system, but may not be listed in the GUI for wiping by the user
userrmrf -- overrides the normal format type of wiping and only allows the partition to be wiped using the rm -rf command
backup= -- must be succeeded by the equals sign, so backup=1 or backup=0, 1 indicates that the partition can be listed in the backup/restore list while 0 ensures that this partition will not show up in the backup list. wipeingui -- makes the partition show up in the GUI to allow the user to select it for wiping in the advanced wipe menu
wipeduringfactoryreset -- the partition will be wiped during a factory reset
ignoreblkid -- blkid is used to determine what file system is in use by TWRP, this flag will cause TWRP to skip/ignore the results of blkid and use the file system specified in the fstab only
retainlayoutversion -- causes TWRP to retain the .layoutversion file in /data on devices like Sony Xperia S which sort of uses /data/media but still has a separate /sdcard partition
symlink= -- causes TWRP to run an additional mount command when mounting the partition, generally used with /data/media to create /sdcard
display= -- sets a display name for the partition for listing in the GUI
storagename= -- sets a storage name for the partition for listing in the GUI storage list
backupname= -- sets a backup name for the partition for listing in the GUI backup/restore list
length= -- usually used to reserve empty space at the end of the /data partition for storing the decryption key when Android's full device encryption is present, not setting this may lead to the inability to encrypt the device
canencryptbackup= -- 1 or 0 to enable/disable, makes TWRP encrypt the backup of this partition if the user chooses encryption (only applies to tar backups, not images)
userdataencryptbackup= -- 1 or 0 to enable/disable, makes TWRP encrypt only the userdata portion of this partition, certain subfuldes like /data/app would not be encrypted to save time
subpartitionof= -- must be succeeded by the equals sign and the path of the partition it is a subpartition of.A subpartition is treated as "part" of the main partition so for instance, TWRP automatically makes /datadata a subpartition of /data. This means that /datadata will not show up in the GUI listings, but /datadata would be wiped, backed up, restored, mounted, and unmounted anytime those operations are performed on /data. A good example of the use of subpartitions is the 3x efs partitions on the LG Optimus G:

/efs1 emmc /dev/block/mmcblk0p12 flags=backup=1;display=EFS /efs2 emmc /dev/block/mmcblk0p13 flags=backup=1;subpartitionof=/efs1 /efs3 emmc /dev/block/mmcblk0p14 flags=backup=1;subpartitionof=/efs1

This lumps all 3 partitions into a single "EFS" entry in the TWRP GUI allowing all three to be backed up and restored together under a single entry. If you have questions, feel free to stop by #twrp on Freenode.If you post here I may not see it for a while as I have lots of threads out there and there's no way for me to keep track of them all. If you successfully port TWRP to a new device, please let us know! We love to hear success stories! If you have code changes that you'd like to submit, please submit them through the Omni Gerrit server.Guide is here. Once you get Omni or CM sync'ed and your TWRP flags set, you should do a source ./build/envsetup.sh We usually lunch for the device in question, so something like "lunch omni_hammerhead-eng". After you lunch successfully for your device this is the command used for most devices:
make clean && make -j# recoveryimage
Replace the # with the core count +1, so if you have a dual core it's -j3 and a quad core becomes -j5, etc. If you're dealing with a "typical" Samsung device, then you'll need to
make -j# bootimage
Most Samsung devices have the recovery included as an extra ramdisk in the boot image instead of a separate recovery partition as found on most other devices.
Old guide here: http://forum.xda-developers.com/show...postcount=1471

[DEV]如何編譯TWRP觸摸recovery

所有的 TWRP 3.x 源碼是公開(kāi)的.你可以自己編譯它燃箭。本指南不會(huì)是一個(gè)逐步的弧关,逐字的類型的指南。如果您不熟悉基本的Linux命令和/或構(gòu)建AOSP碑韵,那么您可能無(wú)法編譯成功。 您可以使用Omni 4.4疚宇,Omni 5.1卢厂,Omni 6.0,CM11.0施戴,CM 12.1或CM 13.0源代碼。推薦使用Omni 5.1或Omni 6.0萌丈。最近赞哗,CM不斷做出改變,使建立TWRP更加困難辆雾,他們不用努力與TWRP合作肪笋。你可以建立CM,但你可能遇到一些小問(wèn)題度迂。如果您不知道如何解決make文件問(wèn)題藤乙,那么您應(yīng)該選擇使用Omni來(lái)代替。 如果你要使用CM, 你需要把TWRP放置在 CM/bootable/recovery-twrp 文件夾并且在你的 BoardConfig.mk 文件中設(shè)置 RECOVERY_VARIANT := twrp .TWRP源代碼可以在這里找到:
https://github.com/omnirom/android_bootable_recovery
選擇最新的可用分支惭墓。Omni不需要這一步坛梁,因?yàn)镺mni默認(rèn)已經(jīng)包含TWRP源,但是如果您使用的是舊版本的Omni腊凶,則可能需要從最新的分支(最新的分支將在較舊的構(gòu)建樹(shù)中編譯成功)

如果您只想構(gòu)建TWRP划咐,可以嘗試使用較小的樹(shù)拴念。您可以嘗試使用此清單。它應(yīng)該在大多數(shù)情況下工作褐缠,但是在某些情況下政鼠,您可能需要在樹(shù)中提供比這個(gè)清單更多的repos:
https://github.com/minimal-manifest-twrp

在 你 編 譯 之 前
注意:如果添加或更改任何flags,在重新編譯需要 make clean 或make clobber 队魏,否則您的flags更改將不會(huì)被拾取公般。 現(xiàn)在你已經(jīng)有源代碼,您需要為你的設(shè)備設(shè)置或更改幾個(gè)構(gòu)建flags胡桨。在你的設(shè)備上找到 BoardConfig.mk官帘。BoardConfig.mk 位于 devices/manufacturer/codename 文件夾(e.g. devices/lge/hammerhead/BoardConfig.mk). 您的board config將需要包括架構(gòu)和平臺(tái)設(shè)置。通常如果你使用一些人已經(jīng)配置的設(shè)備配置,這些已經(jīng)包括在內(nèi), 但如果你自己創(chuàng)建的, 你可能需要添加他們.除了那些,recovery會(huì)在整個(gè)啟動(dòng)中發(fā)送失敗,你可能會(huì)看到teamwin在屏幕上不停的閃爍. 我們經(jīng)常把我們的所有flags放在BoardConfig.mk 的底部 在 #twrp 頭下, 對(duì)于所有設(shè)備你需要告訴TWRP使用什么主題.TW_THEME flag 代替了老的 DEVICE_RESOLUTION flag.TWRP現(xiàn)在使用縮放來(lái)拉伸任何主題以適應(yīng)屏幕分辨率登失。目前有5中設(shè)置: portrait_hdpi, portrait_mdpi, landscape_hdpi, landscape_mdpi, and watch_mdpi.對(duì)于 portrait, 你可以選擇 hdpi 主題當(dāng)分辨率為 720x1280 或更高.對(duì)于 landscape 設(shè)備, 使用 hdpi 主題當(dāng)分辨率為 1280x720 或更高. TW_THEME := portrait_hdpi

注意主題不能旋轉(zhuǎn)90度并且目前沒(méi)有可供旋轉(zhuǎn)的主題.如果你發(fā)現(xiàn)觸摸屏幕相對(duì)于屏幕是旋轉(zhuǎn)的, 那么你可以使用一些flags(在指南的后面會(huì)討論到)來(lái)選擇觸摸輸入來(lái)匹配屏幕方向. 除了分辨率flags, 我們還有以下的構(gòu)建flags:

RECOVERY_SDCARD_ON_DATA := true -- 這個(gè)開(kāi)啟適當(dāng)?shù)奶幚碓O(shè)備上的/data/media 這個(gè)文件夾用來(lái)儲(chǔ)存 (大多數(shù) Honeycomb 和設(shè)備出廠搭載ICS 比如Galaxy Nexus) 雖然這個(gè)flag對(duì)這些類型的設(shè)備不需要.如果你沒(méi)有定義這個(gè) flag 并且在你的fstab中也沒(méi)有包括對(duì)于/sdcard, /internal_sd, /internal_sdcard, 或 /emmc 的任何引用, 那么我們會(huì)自動(dòng)的假設(shè)設(shè)備使用的是模擬存儲(chǔ) BOARD_HAS_NO_REAL_SDCARD:= true - 如果TWRP不適合您的recovery 分區(qū),禁用諸如sdcard分區(qū)之類的東西遏佣,則可能會(huì)節(jié)省一些空間
TW_NO_BATT_PERCENT:= true - 禁用對(duì)于電池百分比不正確支持的設(shè)備的顯示
TW_CUSTOM_POWER_BUTTON:= 107 - 自定義映射鎖定屏幕的電源按鈕
TW_NO_REBOOT_BOOTLOADER:= true - 從重新啟動(dòng)重啟菜單中刪除重啟到bootloader按鈕
TW_NO_REBOOT_RECOVERY:= true - 從重新啟動(dòng)重啟菜單中刪除重啟到recovery按鈕
TW_NO_USB_STORAGE:= true - 在不支持USB存儲(chǔ)的設(shè)備上刪除USB存儲(chǔ)按鈕
RECOVERY_TOUCHSCREEN_SWAP_XY:= true - 交換X和Y軸之間的觸摸的映射
RECOVERY_TOUCHSCREEN_FLIP_Y:= true - 翻轉(zhuǎn)y軸觸摸屏值
RECOVERY_TOUCHSCREEN_FLIP_X:= true - 翻轉(zhuǎn)x軸觸摸屏值

TWRP_EVENT_LOGGING:= t rue - 啟用觸摸事件記錄來(lái)幫助調(diào)試觸摸屏問(wèn)題(請(qǐng)勿將其放在發(fā)行版上 - 它會(huì)很快填滿您的日志文件)
BOARD_HAS_FLIPPED_SCREEN:= true - 對(duì)于屏幕是倒置安裝的,將屏幕上下顛倒

還有其他的構(gòu)建源碼你可以在recovery源碼中在 Android.mk 文件中找到其他大多數(shù)構(gòu)建flags并不常用因此我沒(méi)有把他們都寫(xiě)出來(lái) RECOVERY.FSTAB
TWRP 2.5 或更高的版本支持一些新的 recovery.fstab 特性你可以使用拓展的 TWRP 備份/恢復(fù)功能.你并不需要添加fstab flags,大多數(shù)分區(qū)是自動(dòng)處理的. 請(qǐng)注意挖炬,TWRP當(dāng)前不支持"fstab 2"在4.3或更高版本中看到fstab文件.對(duì)于TWRP你仍然需要使用fstab的 "old" 格式 (該格式的示例如下).為了你的構(gòu)建樹(shù)的最大TWRP 兼容性, 你可以創(chuàng)建一個(gè) twrp.fstab 并且使用 PRODUCT_COPY_FILES 將文件防止在 /etc/twrp.fstab 中. 當(dāng)TWRP啟動(dòng), 如果它發(fā)現(xiàn)了 twrp.fstab 在內(nèi)存盤(pán)虛擬盤(pán)中,它會(huì)重命名 /etc/recovery.fstab 為 /etc/recovery.fstab.bak 并且重命名 /etc/twrp.fstab 為 /etc/recovery.fstab.這將有效地"替換"你的設(shè)備文件提供的fstab 2文件與TWRP fstab,允許您保持設(shè)備文件和其他recoveries的兼容性揽浙。

PRODUCT_COPY_FILES += device/lge/hammerhead/twrp.fstab:recovery/root/etc/twrp.fstab

TWRP中的fstab可以包含fstab中列出的每個(gè)分區(qū)的一些"flags". 以下是一個(gè)我們將使用做來(lái)參考的TWRP fstab 在Galaxy S4的示例.

/boot emmc /dev/block/platform/msm_sdcc.1/by-name/boot /system ext4 /dev/block/platform/msm_sdcc.1/by-name/system /data ext4 /dev/block/platform/msm_sdcc.1/by-name/userdata length=-16384 /cache ext4 /dev/block/platform/msm_sdcc.1/by-name/cache /recovery emmc /dev/block/platform/msm_sdcc.1/by-name/recovery /efs ext4 /dev/block/platform/msm_sdcc.1/by-name/efs flags=display="EFS";backup=1 /external_sd vfat /dev/block/mmcblk1p1 /dev/block/mmcblk1 flags=display="Micro SDcard";storage;wipeingui;removable /usb-otg vfat /dev/block/sda1 /dev/block/sda flags=display="USB-OTG";storage;wipeingui;removable /preload ext4 /dev/block/platform/msm_sdcc.1/by-name/hidden flags=display="Preload";wipeingui;backup=1 /modem ext4 /dev/block/platform/msm_sdcc.1/by-name/apnhlos /mdm emmc /dev/block/platform/msm_sdcc.1/by-name/mdm

Flags已經(jīng)添加在fstab分區(qū)表的末尾,分用白色空格分開(kāi)(空格和Tab都可以).flags僅影響該分區(qū),但不影響任何其他分區(qū)意敛。Flags以分號(hào)分隔.如果你的顯示名稱有空格,則必須用引號(hào)括住顯示名稱.

/external_sd vfat /dev/block/mmcblk1p1 flags=display="Micro SDcard";storage;wipeingui;removable

此分區(qū)的flags給予的一個(gè)顯示名稱是“Micro SDcard”,顯示給用戶馅巷。wipeingui使此分區(qū)可用于擦除在高級(jí)擦除菜單中.可移動(dòng)flag表示有時(shí)此分區(qū)可能不存在,防止在啟動(dòng)期間顯示掛載錯(cuò)誤草姻。下面是一個(gè)完整的列表:
removable -- 表示分區(qū)可能不存在钓猬,防止在啟動(dòng)期間顯示掛載錯(cuò)誤
storage -- 表示分區(qū)可以被用來(lái)儲(chǔ)存,使分區(qū)用來(lái)儲(chǔ)存?zhèn)浞?恢復(fù),zip安裝,等 settingsstorage -- 只有一個(gè)分區(qū)應(yīng)該設(shè)置為設(shè)置存儲(chǔ),該分區(qū)用作存儲(chǔ)TWRP設(shè)置文件的位置
canbewiped -- indicates that the partition can be wiped by the back-end system, but may not be listed in the GUI for wiping by the user
userrmrf -- overrides the normal format type of wiping and only allows the partition to be wiped using the rm -rf command
backup= -- must be succeeded by the equals sign, so backup=1 or backup=0, 1 indicates that the partition can be listed in the backup/restore list while 0 ensures that this partition will not show up in the backup list. wipeingui -- makes the partition show up in the GUI to allow the user to select it for wiping in the advanced wipe menu
wipeduringfactoryreset -- the partition will be wiped during a factory reset
ignoreblkid -- blkid is used to determine what file system is in use by TWRP, this flag will cause TWRP to skip/ignore the results of blkid and use the file system specified in the fstab only
retainlayoutversion -- causes TWRP to retain the .layoutversion file in /data on devices like Sony Xperia S which sort of uses /data/media but still has a separate /sdcard partition
symlink= -- causes TWRP to run an additional mount command when mounting the partition, generally used with /data/media to create /sdcard
display= -- sets a display name for the partition for listing in the GUI
storagename= -- sets a storage name for the partition for listing in the GUI storage list
backupname= -- sets a backup name for the partition for listing in the GUI backup/restore list
length= -- usually used to reserve empty space at the end of the /data partition for storing the decryption key when Android's full device encryption is present, not setting this may lead to the inability to encrypt the device
canencryptbackup= -- 1 or 0 to enable/disable, makes TWRP encrypt the backup of this partition if the user chooses encryption (only applies to tar backups, not images)
userdataencryptbackup= -- 1 or 0 to enable/disable, makes TWRP encrypt only the userdata portion of this partition, certain subfuldes like /data/app would not be encrypted to save time
subpartitionof= -- must be succeeded by the equals sign and the path of the partition it is a subpartition of.A subpartition is treated as "part" of the main partition so for instance, TWRP automatically makes /datadata a subpartition of /data. This means that /datadata will not show up in the GUI listings, but /datadata would be wiped, backed up, restored, mounted, and unmounted anytime those operations are performed on /data. A good example of the use of subpartitions is the 3x efs partitions on the LG Optimus G:

/efs1 emmc /dev/block/mmcblk0p12 flags=backup=1;display=EFS /efs2 emmc /dev/block/mmcblk0p13 flags=backup=1;subpartitionof=/efs1 /efs3 emmc /dev/block/mmcblk0p14 flags=backup=1;subpartitionof=/efs1

這將3個(gè)分區(qū)塊放在TWRP GUI中的單個(gè)“EFS”條目中撩独,允許3個(gè)分區(qū)塊一起備份和恢復(fù)在一個(gè)條目中 如果您有任何問(wèn)題敞曹,請(qǐng)隨時(shí)停止并在Freenode上進(jìn)入#twrp頻道.如果你在這里發(fā)布,我可能暫時(shí)看不到综膀,因?yàn)槲矣泻芏嗟恼搲钠龋覜](méi)有辦法一一跟蹤它們。如果您成功將TWRP移植到新設(shè)備上剧劝,請(qǐng)通知我們橄登!我們喜歡聽(tīng)成功故事! 如果你要提交更改的代碼讥此,請(qǐng)通過(guò)Omni Gerrit服務(wù)器提交拢锹。Guide is here. 當(dāng)你獲得Omni 或CM 同步并且你的TWRP flags 已經(jīng)設(shè)置, 你應(yīng)該 source ./build/envsetup.sh .我們通常對(duì)設(shè)備lunch調(diào)試, 所以有時(shí)候像"lunch omni_hammerhead-eng". 在你對(duì)你的設(shè)備lunch成功后,這個(gè)命令應(yīng)用于大多數(shù)設(shè)備:

make clean && make -j# recoveryimage

用 # 代替核心數(shù)+1, 所以說(shuō)如果你有一個(gè)雙核處理器那么就是-j3 如果是一個(gè)4核處理區(qū)那么就是 -j5, 以此類推.如果你正在處理一個(gè)"典型的"三星設(shè)備,那么你需要

make -j# bootimage

Most Samsung devices have the recovery included as an extra ramdisk in the boot image instead of a separate recovery partition as found on most other devices. Old guide here: http://forum.xda-developers.com/show...postcount=1471

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
  • 序言:七十年代末,一起剝皮案震驚了整個(gè)濱河市萄喳,隨后出現(xiàn)的幾起案子卒稳,更是在濱河造成了極大的恐慌,老刑警劉巖他巨,帶你破解...
    沈念sama閱讀 216,372評(píng)論 6 498
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件展哭,死亡現(xiàn)場(chǎng)離奇詭異湃窍,居然都是意外死亡,警方通過(guò)查閱死者的電腦和手機(jī)匪傍,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 92,368評(píng)論 3 392
  • 文/潘曉璐 我一進(jìn)店門(mén)您市,熙熙樓的掌柜王于貴愁眉苦臉地迎上來(lái),“玉大人役衡,你說(shuō)我怎么就攤上這事茵休。” “怎么了手蝎?”我有些...
    開(kāi)封第一講書(shū)人閱讀 162,415評(píng)論 0 353
  • 文/不壞的土叔 我叫張陵榕莺,是天一觀的道長(zhǎng)。 經(jīng)常有香客問(wèn)我棵介,道長(zhǎng)钉鸯,這世上最難降的妖魔是什么? 我笑而不...
    開(kāi)封第一講書(shū)人閱讀 58,157評(píng)論 1 292
  • 正文 為了忘掉前任邮辽,我火速辦了婚禮唠雕,結(jié)果婚禮上,老公的妹妹穿的比我還像新娘吨述。我一直安慰自己岩睁,他們只是感情好,可當(dāng)我...
    茶點(diǎn)故事閱讀 67,171評(píng)論 6 388
  • 文/花漫 我一把揭開(kāi)白布揣云。 她就那樣靜靜地躺著捕儒,像睡著了一般。 火紅的嫁衣襯著肌膚如雪邓夕。 梳的紋絲不亂的頭發(fā)上刘莹,一...
    開(kāi)封第一講書(shū)人閱讀 51,125評(píng)論 1 297
  • 那天,我揣著相機(jī)與錄音焚刚,去河邊找鬼点弯。 笑死,一個(gè)胖子當(dāng)著我的面吹牛汪榔,可吹牛的內(nèi)容都是我干的蒲拉。 我是一名探鬼主播,決...
    沈念sama閱讀 40,028評(píng)論 3 417
  • 文/蒼蘭香墨 我猛地睜開(kāi)眼痴腌,長(zhǎng)吁一口氣:“原來(lái)是場(chǎng)噩夢(mèng)啊……” “哼雌团!你這毒婦竟也來(lái)了?” 一聲冷哼從身側(cè)響起士聪,我...
    開(kāi)封第一講書(shū)人閱讀 38,887評(píng)論 0 274
  • 序言:老撾萬(wàn)榮一對(duì)情侶失蹤锦援,失蹤者是張志新(化名)和其女友劉穎,沒(méi)想到半個(gè)月后剥悟,有當(dāng)?shù)厝嗽跇?shù)林里發(fā)現(xiàn)了一具尸體灵寺,經(jīng)...
    沈念sama閱讀 45,310評(píng)論 1 310
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡曼库,尸身上長(zhǎng)有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 37,533評(píng)論 2 332
  • 正文 我和宋清朗相戀三年,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了略板。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片毁枯。...
    茶點(diǎn)故事閱讀 39,690評(píng)論 1 348
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡,死狀恐怖叮称,靈堂內(nèi)的尸體忽然破棺而出种玛,到底是詐尸還是另有隱情,我是刑警寧澤瓤檐,帶...
    沈念sama閱讀 35,411評(píng)論 5 343
  • 正文 年R本政府宣布赂韵,位于F島的核電站,受9級(jí)特大地震影響挠蛉,放射性物質(zhì)發(fā)生泄漏祭示。R本人自食惡果不足惜,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 41,004評(píng)論 3 325
  • 文/蒙蒙 一谴古、第九天 我趴在偏房一處隱蔽的房頂上張望质涛。 院中可真熱鬧,春花似錦讥电、人聲如沸蹂窖。這莊子的主人今日做“春日...
    開(kāi)封第一講書(shū)人閱讀 31,659評(píng)論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽(yáng)。三九已至横媚,卻和暖如春纠炮,著一層夾襖步出監(jiān)牢的瞬間,已是汗流浹背灯蝴。 一陣腳步聲響...
    開(kāi)封第一講書(shū)人閱讀 32,812評(píng)論 1 268
  • 我被黑心中介騙來(lái)泰國(guó)打工恢口, 沒(méi)想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留,地道東北人穷躁。 一個(gè)月前我還...
    沈念sama閱讀 47,693評(píng)論 2 368
  • 正文 我出身青樓耕肩,卻偏偏與公主長(zhǎng)得像,于是被迫代替她去往敵國(guó)和親问潭。 傳聞我的和親對(duì)象是個(gè)殘疾皇子猿诸,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 44,577評(píng)論 2 353

推薦閱讀更多精彩內(nèi)容