Difference between revisions of "ROM Android: Kernel MediaTek"

From OnnoWiki
Jump to navigation Jump to search
Line 3: Line 3:
 
* https://android.googlesource.com/kernel/mediatek/+/android-4.4.4_r3
 
* https://android.googlesource.com/kernel/mediatek/+/android-4.4.4_r3
  
Download dengan cara
+
==Download==
  
 
  cd ~
 
  cd ~
Line 13: Line 13:
 
  mediatek
 
  mediatek
  
Unpack source code
+
==cek pack==
  
 
  cd ~/mediatek/.git/objects/pack
 
  cd ~/mediatek/.git/objects/pack
Line 23: Line 23:
 
  pack-5e2cd1c8f09391c09a228f514449da0228f3a96f.pack
 
  pack-5e2cd1c8f09391c09a228f514449da0228f3a96f.pack
  
Unpack objects dengan cara
+
==Check branch master==
  
  cd ~/mediatek/.git/objects/pack
+
  cd ~/mediatek/
  git unpack-objects < pack-5e2cd1c8f09391c09a228f514449da0228f3a96f.pack
+
  git checkout master
  
Akan keluar sampai 100%
+
Akan keluar
  
  Unpacking objects: 100% (2472039/2472039), done.
+
  Already on 'master'
 +
Your branch is up-to-date with 'origin/master'.
  
 +
==Check HEAD==
  
 +
git rev-parse HEAD
  
 +
Hasilnya
  
 +
610ba0c10976208568a21fde3626ab847d484999
  
 +
==Siapkan folder baru mediatek-kernel==
  
 +
cd ~
 +
git init mediatek-kernel
  
 +
Hasilnya
  
  2 down vote accepted
+
  Initialized empty Git repository in /home/onno/mediatek-kernel/.git/
+
 
 +
Isi dengan .pack mediatek
 +
 
 +
cd ~
 +
cp mediatek/.git/objects/pack/* mediatek-kernel/.git/objects/pack
  
If you place the .pack files inside the .git/objects/pack/ directory of a newly git init'd repository, you should be able to git checkout -b somebranch ANYSHA1.
 
  
For example:
+
==Extract .pack==
  
# find a commit:
+
cd ~/mediatek-kernel
faux@reg:~/git% git rev-parse HEAD
+
git checkout -b master 610ba0c10976208568a21fde3626ab847d484999
6f5e880c68099b185e60b2492c75e506e16d8292
 
faux@reg:~/git% cd ..
 
  
# init:
+
==Check hasil==
faux@reg:~% git init bar
 
Initialized empty Git repository in /home/faux/bar/.git/
 
  
# add packs:
+
faux@reg:~% cp git/.git/objects/pack/* bar/.git/objects/pack
+
cd ~/mediatek-kernel
faux@reg:~% cd bar
+
ls -lh
  
# checkout:
 
faux@reg:~/bar% git checkout -b somebranch 6f5e880c68099b185e60b2492c75e506e16d8292
 
Switched to a new branch 'somebranch'
 
  
# done!
+
==Untuk menambahkan / update==
faux@reg:~/bar% ls
 
abspath.c
 
contrib
 
...
 
  
share|improve this answer
+
  git remote add -f origin https://android.googlesource.com/kernel/mediatek
 
answered Feb 18 '12 at 21:36
 
FauxFaux
 
1,24429
 
 
 
 
 
Thank you very much for the detailed steps. I was struggling for the last one week. But now I am able to get the files. Will I be able to fetch/push/pull to the remote repository now? Do i need to make any changes in the .git directory to connect to the remote repository? How do I be able to switch to a branch that is available in the remote repository? Do I need to copy any files? Thank you very much again. –  user917279 Feb 19 '12 at 7:55
 
 
 
 
Actually I tried a git init and a git reset --hard, after git status reported me that the files were deleted. But your approach looks clean. – user917279 Feb 19 '12 at 8:08
 
 
 
 
You should now be able to git remote add -f origin url://to/remote/repository, then git remote update will happily download very little (hopefully!), and you'll be able to continue as normal. –  FauxFaux Feb 19 '12 at 13:28
 

Revision as of 04:20, 3 January 2015

Download

cd ~
git clone https://android.googlesource.com/kernel/mediatek

Hasilnya akan di simpan di folder

cd ~
mediatek

cek pack

cd ~/mediatek/.git/objects/pack
ls

Akan keluar dua file

pack-5e2cd1c8f09391c09a228f514449da0228f3a96f.idx
pack-5e2cd1c8f09391c09a228f514449da0228f3a96f.pack

Check branch master

cd ~/mediatek/
git checkout master

Akan keluar

Already on 'master'
Your branch is up-to-date with 'origin/master'.

Check HEAD

git rev-parse HEAD

Hasilnya

610ba0c10976208568a21fde3626ab847d484999

Siapkan folder baru mediatek-kernel

cd ~
git init mediatek-kernel

Hasilnya

Initialized empty Git repository in /home/onno/mediatek-kernel/.git/

Isi dengan .pack mediatek

cd ~
cp mediatek/.git/objects/pack/* mediatek-kernel/.git/objects/pack


Extract .pack

cd ~/mediatek-kernel
git checkout -b master 610ba0c10976208568a21fde3626ab847d484999

Check hasil

cd ~/mediatek-kernel
ls -lh


Untuk menambahkan / update

git remote add -f origin https://android.googlesource.com/kernel/mediatek