[DEV][Porting] Ubuntu Touch on Galaxy Note II (GT-N7100)

Bert.C

Senior Member
Aug 21, 2010
485
223
0
kk, thanks but theres another question, while I was doing repo sync, I got error "fatal: Invalid git file format: ...repo/repo/.git/clone.bundle"
It was in beginning but after that sync went smoothly with no errors.
Should I ignore this or do sync again (actually, my limited speed pack got just finished, so doing repo sync again will be a pain....)
Thanks.

And btw did anyone overcome this RIL issue?
I wonder if using RIL from CM sources is possible...?

(Please, no bad words, I am just a beginner at such stuff... ok I successfully built a miui and aosp rom but this is different and i want to learn more)

EDIT:
Ok I did repo sync again without removing .repo folder. It fetched every file successfully.
So is it ok for me to proceed to build now?
It should be my friend. If you look through the first few threads I'm sure there was a mention for network fix actually, worst comes to worst though you should be able to use CM RIL no problem, don't ask me how though as I'm still learning too haha.
 
  • Like
Reactions: Jaskaran498

Jaskaran498

Senior Member
Jul 29, 2012
707
151
0
24
Ludhiana
It should be my friend. If you look through the first few threads I'm sure there was a mention for network fix actually, worst comes to worst though you should be able to use CM RIL no problem, don't ask me how though as I'm still learning too haha.
Hi
So I went for final build command->

Code:
mka bacon -j8
(my virtual machine is 4 cored).

It gives following output->
http://pastebin.com/CcNXpbSR

But there is no build file (that .zip file) in out/target/product/DeviceName/
Any help please.

PS->
I used these commands->
Code:
phablet-dev-bootstrap [target_directory]
repo sync -j3
 . build/envsetup.sh
lunch cm_DeviceCodename-userdebug
mka bacon -j8
I basically didn't see any errors in outputs except "fatal: Invalid git file format: ...repo/repo/.git/clone.bundle" but thats network problem. Right? And btw the sync went fine after that. Even when I ran repo sync again (without deleting repo folder), it successfully fetched everything from existing files. There was no error then.
I also did run make clean command before building it, but still.....
Please help.
 
Last edited:

Bert.C

Senior Member
Aug 21, 2010
485
223
0
Hi
So I went for final build command->

Code:
mka bacon -j8
(my virtual machine is 4 cored).

It gives following output->
http://pastebin.com/CcNXpbSR

But there is no build file (that .zip file) in out/target/product/DeviceName/
Any help please.

PS->
I used these commands->
Code:
phablet-dev-bootstrap [target_directory]
repo sync -j3
 . build/envsetup.sh
lunch cm_DeviceCodename-userdebug
mka bacon -j8
I basically didn't see any errors in outputs except "fatal: Invalid git file format: ...repo/repo/.git/clone.bundle" but thats network problem. Right? And btw the sync went fine after that. Even when I ran repo sync again (without deleting repo folder), it successfully fetched everything from existing files. There was no error then.
I also did run make clean command before building it, but still.....
Please help.
It failed because of this I think:

Code:
make: *** No rule to make target `/home/jaskaran/android/UbuntuPort/out/target/common/obj/APPS/framework-res_intermediates/src/R.stamp', needed by `/home/jaskaran/android/UbuntuPort/out/target/common/obj/APPS/DeviceSettings_intermediates/src/R.stamp'.  Stop.
And "fatal: Invalid git file format: ...repo/repo/.git/clone.bundle" is to do with repo etc but if you ran repo sync again and it worked then that's okay, but that fatal error isn't to do with the network issue I don't think.
 
  • Like
Reactions: Jaskaran498

Jaskaran498

Senior Member
Jul 29, 2012
707
151
0
24
Ludhiana
It failed because of this I think:

Code:
make: *** No rule to make target `/home/jaskaran/android/UbuntuPort/out/target/common/obj/APPS/framework-res_intermediates/src/R.stamp', needed by `/home/jaskaran/android/UbuntuPort/out/target/common/obj/APPS/DeviceSettings_intermediates/src/R.stamp'.  Stop.
And "fatal: Invalid git file format: ...repo/repo/.git/clone.bundle" is to do with repo etc but if you ran repo sync again and it worked then that's okay, but that fatal error isn't to do with the network issue I don't think.
Well... if I ran git again and it went ok, then it should mean there wasn't problem right?

And can you please give a solution (or atleast idea) on what to do with this error...?:confused:

EDIT:

I came over this problem by editing the i9300.mk and removing "DeviceSettings \"->
Code:
# Product specific Packages
PRODUCT_PACKAGES += \
    DeviceSettings \
    libsecril-client \
    libsecril-client-sap \
    SamsungServiceMode \
    tinyplay
(so is it ok? Or will I loose settings app?)

Anyhow, I came over this error and there is a new one now->

Code:
Export includes file: frameworks/av/services/camera/libcameraservice/Android.mk -- /home/jaskaran/android/UbuntuPort/out/target/product/i9300/obj/SHARED_LIBRARIES/libcameraservice_intermediates/export_includes
make: *** No rule to make target `/home/jaskaran/android/UbuntuPort/out/target/product/i9300/obj/SHARED_LIBRARIES/libTVOut_intermediates/export_includes', needed by `/home/jaskaran/android/UbuntuPort/out/target/product/i9300/obj/EXECUTABLES/mediaserver_intermediates/import_includes'.  Stop.
make: *** Waiting for unfinished jobs....
Please help.
Thanks.
 
Last edited:

Bert.C

Senior Member
Aug 21, 2010
485
223
0
Well... if I ran git again and it went ok, then it should mean there wasn't problem right?

And can you please give a solution (or atleast idea) on what to do with this error...?:confused:

EDIT:

I came over this problem by editing the i9300.mk and removing "DeviceSettings \"->
Code:
# Product specific Packages
PRODUCT_PACKAGES += \
    DeviceSettings \
    libsecril-client \
    libsecril-client-sap \
    SamsungServiceMode \
    tinyplay
(so is it ok? Or will I loose settings app?)

Anyhow, I came over this error and there is a new one now->

Code:
Export includes file: frameworks/av/services/camera/libcameraservice/Android.mk -- /home/jaskaran/android/UbuntuPort/out/target/product/i9300/obj/SHARED_LIBRARIES/libcameraservice_intermediates/export_includes
make: *** No rule to make target `/home/jaskaran/android/UbuntuPort/out/target/product/i9300/obj/SHARED_LIBRARIES/libTVOut_intermediates/export_includes', needed by `/home/jaskaran/android/UbuntuPort/out/target/product/i9300/obj/EXECUTABLES/mediaserver_intermediates/import_includes'.  Stop.
make: *** Waiting for unfinished jobs....
Please help.
Thanks.
Not 100% sure on first error, just see how it goes? and if it does build but you loose device settings then you/we shall have to find a fix after.

As for your second error, try this and try rebuilding:

Code:
mkdir -p out/target/product/i9300/obj/SHARED_LIBRARIES/libLibTvOut_intermediates/

touch out/target/product/i9300/obj/SHARED_LIBRARIES/libTvOut_intermediates/export_includes
 

Jaskaran498

Senior Member
Jul 29, 2012
707
151
0
24
Ludhiana
Not 100% sure on first error, just see how it goes? and if it does build but you loose device settings then you/we shall have to find a fix after.

As for your second error, try this and try rebuilding:

Code:
mkdir -p out/target/product/i9300/obj/SHARED_LIBRARIES/libLibTvOut_intermediates/

touch out/target/product/i9300/obj/SHARED_LIBRARIES/libTvOut_intermediates/export_includes
Running those two commands produce following results->

First: All fine (ofcourse!)

Second: Error->

Code:
[email protected]:/home/jaskaran/android/UbuntuPort# touch out/target/product/i9300/obj/SHARED_LIBRARIES/libTvOut_intermediates/export_includes
touch: cannot touch ‘out/target/product/i9300/obj/SHARED_LIBRARIES/libTvOut_intermediates/export_includes’: No such file or directory
I am actually thinking to download cm10.1 source and replace device settings folder of ubuntu with one present in cm. How should i check if they have same device tree (i mean, is it possible that cm device settings uses different dependencies??)?
 
Last edited:

Bert.C

Senior Member
Aug 21, 2010
485
223
0
Running those two commands produce following results->

First: All fine (ofcourse!)

Second: Error->

Code:
[email protected]:/home/jaskaran/android/UbuntuPort# touch out/target/product/i9300/obj/SHARED_LIBRARIES/libTvOut_intermediates/export_includes
touch: cannot touch ‘out/target/product/i9300/obj/SHARED_LIBRARIES/libTvOut_intermediates/export_includes’: No such file or directory
I am actually thinking to download cm10.1 source and replace device settings folder of ubuntu with one present in cm. How should i check if they have same device tree?
Have you got the blobs for your device?
 

Jaskaran498

Senior Member
Jul 29, 2012
707
151
0
24
Ludhiana
Have you got the blobs for your device?
Ok, a user had already done this stuff while building ubuntu for my phone.

So i took those files from his repository by->

Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
  <remote name="github" fetch="git://github.com" />
     
  <project path="device/samsung/i9300" name="Androguide/android_device_samsung_i9300" remote="github" revision="master"/>
  <project path="kernel/samsung/smdk4412" name="Androguide/android_kernel_samsung_smdk4412" remote="github" revision="master"/>
  <project path="device/samsung/smdk4412-common" name="Androguide/android_device_samsung_smdk4412-common" remote="github" revision="master"/>
  <project path="vendor/samsung" name="Androguide/android_vendor_samsung" remote="github" revision="master" />
  <project path="hardware/samsung" name="Ubuntu-i9100/android_hardware_samsung" remote="github" revision="phablet-10.1"/>
</manifest>
I created a local_manifest folder in my root directory (please note it had already synced ubuntu sources in that dir), and put local_manifest.xml containing this code in it.
Then ran repo sync again (thats when I got "fatal: Invalid git file format: ...repo/repo/.git/clone.bundle", but I ran repo again and it fetched files successfully as i told above).
But it seems like somehow these files didn't come to directory (dont know how!)...
So i am thinking to download them manually,

Here is link to his repository for prop blobs-> https://github.com/Androguide/android_vendor_samsung/tree/master/i9300/proprietary/system

Please tell what should I do.

Here are other repositories by him->
i9300 Device-Tree: https://github.com/Androguide/androi..._samsung_i9300
Exynos4412 Kernel: https://github.com/Androguide/androi...msung_smdk4412
Exynos4412 Common device-tree: https://github.com/Androguide/androi...mdk4412-common
Proprietary blobs: https://github.com/Androguide/android_vendor_samsung
CM common vendor blobs: https://github.com/Androguide/android_vendor_cm
local_manifest & modified CM manifest: https://github.com/Androguide/Ubuntu-Touch_manifests
Platform source code: http://phablet.ubuntu.com/gitweb

If this repo didn't get files then its possible that other repos also didn't download any files.


EDIT:

Seems like something went wrong with xml, (I believe its "that" above error), so I will be trying things manually... :/
 
Last edited:

Bert.C

Senior Member
Aug 21, 2010
485
223
0
Ok, a user had already done this stuff while building ubuntu for my phone.

So i took those files from his repository by->

Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
  <remote name="github" fetch="git://github.com" />
     
  <project path="device/samsung/i9300" name="Androguide/android_device_samsung_i9300" remote="github" revision="master"/>
  <project path="kernel/samsung/smdk4412" name="Androguide/android_kernel_samsung_smdk4412" remote="github" revision="master"/>
  <project path="device/samsung/smdk4412-common" name="Androguide/android_device_samsung_smdk4412-common" remote="github" revision="master"/>
  <project path="vendor/samsung" name="Androguide/android_vendor_samsung" remote="github" revision="master" />
  <project path="hardware/samsung" name="Ubuntu-i9100/android_hardware_samsung" remote="github" revision="phablet-10.1"/>
</manifest>
I created a local_manifest folder in my root directory (please note it had already synced ubuntu sources in that dir), and put local_manifest.xml containing this code in it.
Then ran repo sync again (thats when I got "fatal: Invalid git file format: ...repo/repo/.git/clone.bundle", but I ran repo again and it fetched files successfully as i told above).
But it seems like somehow these files didn't come to directory (dont know how!)...
So i am thinking to download them manually,

Here is link to his repository for prop blobs-> https://github.com/Androguide/android_vendor_samsung/tree/master/i9300/proprietary/system

Please tell what should I do.

Here are other repositories by him->
i9300 Device-Tree: https://github.com/Androguide/androi..._samsung_i9300
Exynos4412 Kernel: https://github.com/Androguide/androi...msung_smdk4412
Exynos4412 Common device-tree: https://github.com/Androguide/androi...mdk4412-common
Proprietary blobs: https://github.com/Androguide/android_vendor_samsung
CM common vendor blobs: https://github.com/Androguide/android_vendor_cm
local_manifest & modified CM manifest: https://github.com/Androguide/Ubuntu-Touch_manifests
Platform source code: http://phablet.ubuntu.com/gitweb

If this repo didn't get files then its possible that other repos also didn't download any files.
So I am thinking to download them manually. Any ideas how should I put them (i mean, how do I maintain correct directory structure)?
I wouldnt download them manually, the repo tool is your best bet.
local_manifest.xml file goes in .repo/local_manifests/ directory

Note the S at the end of local_manifests for the directory but not at the end of the .xml file - double check this in your build environment.
 

Jaskaran498

Senior Member
Jul 29, 2012
707
151
0
24
Ludhiana
I wouldnt download them manually, the repo tool is your best bet.
local_manifest.xml file goes in .repo/local_manifests/ directory

Note the S at the end of local_manifests for the directory but not at the end of the .xml file - double check this in your build environment.
Yeah, my directory name is correct->
....repo/local_manifests/local_manifest.xml

Somehow the i9300 Device-Tree, Exynos4412 Kernel and Exynos4412 Common device-tree were sync (their respective files with directories are present in device/samsung/i9300/)

So now I am downloading Proprietary blobs to a separate folder using->

Code:
repo init -u git://github.com/Androguide/android_vendor_samsung -b master
After download, I plan to put them in device/samsung/i9300
Is it correct way?

I am thinking to download similarly CM common vendor blobs, local_manifest & modified CM manifest and I alrady got platform source code using
Code:
phablet-dev-bootstrap [then my directory here]
.

But I am unclear of how to put them in... Should I put them in device/samsung/i9300?
 

Jaskaran498

Senior Member
Jul 29, 2012
707
151
0
24
Ludhiana
I think they need to go in vendor/samsung/i9300 iirc

Sent from my GT-N7100 using Tapatalk
Well... I just figured out root problem.
A file called "clone.bundle" is missing in ".../.repo/repo/.git"
Thats interrupting the repo from syncing completely.
I have tried re-downloading all stuff, but its still same.
Any solutions?
I have already tried redownloading repo a million times.
But still having same result. It displays following error->
Code:
fatal: Invalid git file format: .../.repo/repo/.git/clone.bundle
And so I decided to do things a little more manually, I am downloading prop blobs via->
Code:
git clone
Lets see how it goes...



EDIT:
Ok, it went pretty far till->

Code:
Export includes file: hardware/samsung/exynos/multimedia/openmax/osal/Android.mk -- /home/jaskaran/android/UbuntuPort/out/target/product/i9300/obj/STATIC_LIBRARIES/libsecosal_intermediates/export_includes
make: *** No rule to make target `/home/jaskaran/android/UbuntuPort/out/target/product/i9300/obj/SHARED_LIBRARIES/libandroid_runtime_intermediates/export_includes', needed by `/home/jaskaran/android/UbuntuPort/out/target/product/i9300/obj/STATIC_LIBRARIES/libsecosal_intermediates/import_includes'.  Stop.
make: *** Waiting for unfinished jobs....
Any ideas?
 
Last edited:

Bert.C

Senior Member
Aug 21, 2010
485
223
0
Id temporarily remove the the file android.mk in hardware/samsung/exynos/multimedia/openmax/osal folder from your build environment for now, dont delete it just move it to your documents folder or desktop for now and try a rebuild. I still think you need to fix the git/repo problem out first though.

Sent from my GT-N7100 using Tapatalk
 

Jaskaran498

Senior Member
Jul 29, 2012
707
151
0
24
Ludhiana
Id temporarily remove the the file android.mk in hardware/samsung/exynos/multimedia/openmax/osal folder from your build environment for now, dont delete it just move it to your documents folder or desktop for now and try a rebuild. I still think you need to fix the git/repo problem out first though.

Sent from my GT-N7100 using Tapatalk
well... moving android.mk didn't work, nor commenting out that library did.
Seems my only choice is to build a CM10.1 rom and copy missing stuff from it.
But hell, my internet is too slow... So can I copy Device/Samsung/i9300 (the device specific stuff) from Ubuntu folder to CM folder? (That will save me trouble of downloading device specific stuff again....) Or there are differences in two (between the Device Specific Settings used in Ubuntu and those used in CM)?
 

Bert.C

Senior Member
Aug 21, 2010
485
223
0
well... moving android.mk didn't work, nor commenting out that library did.
Seems my only choice is to build a CM10.1 rom and copy missing stuff from it.
But hell, my internet is too slow... So can I copy Device/Samsung/i9300 (the device specific stuff) from Ubuntu folder to CM folder? (That will save me trouble of downloading device specific stuff again....) Or there are differences in two (between the Device Specific Settings used in Ubuntu and those used in CM)?
Nope copying your device/* folder would be fine. id also copy your vendor/* folder too to save time re-downloading the proprietary blobs.

The manin difference is that the ubuntu-touch repo/bootstrap method only downloads that base requirements so you don't get all the extra apps etc that you don't need.

If you are doing it the CM10.1 way then dont forget that you need to make some changes to your kernel aswel, I read that on the ubuntu-touch porting page.
 
  • Like
Reactions: Jaskaran498

Jaskaran498

Senior Member
Jul 29, 2012
707
151
0
24
Ludhiana
Nope copying your device/* folder would be fine. id also copy your vendor/* folder too to save time re-downloading the proprietary blobs.

The manin difference is that the ubuntu-touch repo/bootstrap method only downloads that base requirements so you don't get all the extra apps etc that you don't need.

If you are doing it the CM10.1 way then dont forget that you need to make some changes to your kernel aswel, I read that on the ubuntu-touch porting page.
ok... so i downloaded and built a cm 10.1 rom successfully...
and then decided to run ubuntu build in order to check for missing libraries...
and there are two strange things->
1) Ubuntu built didn't stop at any error (like earlier it used to, I didn't do anything).
2) So i just let it built in order to see results, for now, its been stuck for about an hour on->

Code:
Downloading ubuntu-touch-generic-initrd version 0.66
8353 blocks
Although my internet is real sloppy now a days, but is it normal?
PS-> the CM and Ubuntu directory are completely different, so no idea what it did for missing libraries...
And I can write anything in terminal, (though its stuck on those lines).... (see screenshot->)




EDIT:
Ok, rebuilt it... and it went forward, for now, I dont really have time to see whther it completes so i'll be leaving it like that to build and check back when I am home.
Btw any ideas about no error regarding missing libraries?
 
Last edited:

Bert.C

Senior Member
Aug 21, 2010
485
223
0
ok... so i downloaded and built a cm 10.1 rom successfully...
and then decided to run ubuntu build in order to check for missing libraries...
and there are two strange things->
1) Ubuntu built didn't stop at any error (like earlier it used to, I didn't do anything).
2) So i just let it built in order to see results, for now, its been stuck for about an hour on->

Code:
Downloading ubuntu-touch-generic-initrd version 0.66
8353 blocks
Although my internet is real sloppy now a days, but is it normal?
PS-> the CM and Ubuntu directory are completely different, so no idea what it did for missing libraries...
And I can write anything in terminal, (though its stuck on those lines).... (see screenshot->)




EDIT:
Ok, rebuilt it... and it went forward, for now, I dont really have time to see whther it completes so i'll be leaving it like that to build and check back when I am home.
Btw any ideas about no error regarding missing libraries?
I haven't got a clue mate, I tried a build for my N7100 yesterday and that just got me stuck in a bootloop so I'm back on another rom at the moment until I either 1) try again and try and get a build up and running or 2) I quit with ubuntu-touch and try just porting a pure AOSP rom for the N7100.

I'm not 100% sure what I'd like to do yet.
 

Jaskaran498

Senior Member
Jul 29, 2012
707
151
0
24
Ludhiana
I haven't got a clue mate, I tried a build for my N7100 yesterday and that just got me stuck in a bootloop so I'm back on another rom at the moment until I either 1) try again and try and get a build up and running or 2) I quit with ubuntu-touch and try just porting a pure AOSP rom for the N7100.

I'm not 100% sure what I'd like to do yet.
I just tried the CM build, nothing goes past the first splash screen! (that GT-i9300 thing)!!!
Why man??? I build rom fine with no errors... then why?

I hope I got all proprietary blobs, here is folder structure->
device/samsung/i9300/proprietary/system
and this this directory there are 3 more folders as-> bin, lib, usr Is that correct of is it incomplete?

And I followed normal device procedure, firs initialize repo, get sources by repo sync, get device specific stuff by breakfast command, get proprietary blobs by that git repository as I told in above comments, build the rom. Thats it right? Do we have to build kernel or something also?

PS-> Got latest philz as recovery, hope I dont need to get CWM?
 
Last edited:

Bert.C

Senior Member
Aug 21, 2010
485
223
0
I just tried the CM build, nothing goes past the first splash screen! (that GT-i9300 thing)!!!
Why man??? I build rom fine with no errors... then why?

I hope I got all proprietary blobs, here is folder structure->
device/samsung/i9300/proprietary/system
and this this directory there are 3 more folders as-> bin, lib, usr Is that correct of is it incomplete?

And I followed normal device procedure, firs initialize repo, get sources by repo sync, get device specific stuff by breakfast command, get proprietary blobs by that git repository as I told in above comments, build the rom. Thats it right? Do we have to build kernel or something also?

PS-> Got latest philz as recovery, hope I dont need to get CWM?
Same happened to my build, got 1 or 2 errors which took me all of 2 minutes to fix and the rest built fine. but it didn't boot, must be something to do with kernel but I'm not 100% sure what yet.

Also I think proprietary blobs go in vendor/samsung/i9300/

Search TheMuppets on github and see what directory they need to go in.
 

Jaskaran498

Senior Member
Jul 29, 2012
707
151
0
24
Ludhiana
Same happened to my build, got 1 or 2 errors which took me all of 2 minutes to fix and the rest built fine. but it didn't boot, must be something to do with kernel but I'm not 100% sure what yet.

Also I think proprietary blobs go in vendor/samsung/i9300/

Search TheMuppets on github and see what directory they need to go in.
Well... seems like blobs are at correct place, when I place them in vendor folder, it gives me duplicate error....

And about kernel, I tried flashing some other kernel right after installation and the result was same :(

Did you manage to fix your problem?

And also, that Ubuntu compiled, but zip size was only 25mb!