-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Absolutely Anonymous
committed
Aug 10, 2021
0 parents
commit bbdb8e5
Showing
8 changed files
with
935 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
Builds of Replicant | ||
|
||
Only Wolfgang's fork of replicant 4.2 is supported at the moment. | ||
|
||
The code was created on-the-fly so is unlikely to work without modifications. | ||
|
||
Nexus S, boot, system and recovery images have been uploaded in the "out directory". | ||
|
||
Compiling Replicant/Android from source was the only way I could find of fixing SSL/TLS on the device. | ||
|
||
SHA256SUMS: | ||
b908a7507d84af3bb313c651e690b272b429566652d36839a6e6dcff56dbb099 system.img | ||
a2e2de1460566fc0c28bff52ea96ec092f7e172ff366f80c622ca444506a5665 boot.img | ||
084efda82371b2936cced4a94b5390a7ced342b71f61ed8e1312a792598f81ad recovery.img |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/bin/bash | ||
|
||
mknod /dev/null c 1 3 | ||
chmod 666 /dev/null | ||
mknod -m 444 /dev/random c 1 8 | ||
mknod -m 444 /dev/urandom c 1 9 | ||
mkdir -v /dev/pts | ||
mount -vt devpts -o gid=4,mode=620 none /dev/pts | ||
mount proc /proc -t proc | ||
|
||
cd /Sources | ||
|
||
thepwd="$PWD" | ||
|
||
apt-get update | ||
dpkg --add-architecture i386 ; apt-get update | ||
apt-get build-dep gcc binutils llvm-defaults | ||
apt-get install bash gcc-arm-none-eabi cmake python-dev swig ant bc proguard maven-debian-helper libemma-java libasm4-java libguava-java libnb-platform18-java libnb-org-openide-util-java libandroidsdk-ddmlib-java libmaven-source-plugin-java libfreemarker-java libmaven-javadoc-plugin-java ca-cacert curl gawk libgmp3-dev libmpfr-dev libmpc-dev git-core gperf libncurses-dev squashfs-tools pngcrush zip zlib1g-dev lzma libc6-dev-i386 g++-multilib lib32z1-dev lib32readline-dev lib32ncurses5-dev zlib1g-dev:i386 xsltproc python-mako schedtool gradle dirmngr libandroidsdk-sdklib-java eclipse-jdt libgradle-android-plugin-java android-sdk-build-tools android-sdk-platform-23 aapt lzop rsync | ||
|
||
#wget https://download.java.net/openjdk/jdk7u75/ri/openjdk-7u75-b13-linux-x64-18_dec_2014.tar.gz | ||
#tar xvf openjdk-7u75-b13-linux-x64-18_dec_2014.tar.gz | ||
|
||
#make some symlinks, required for debian 9 | ||
cd /usr/bin | ||
ln -s /bin/grep ./ | ||
ln -s /bin/mkdir ./ | ||
ln -s /bin/sed ./ | ||
|
||
#https://redmine.replicant.us/issues/1761 | ||
apt-get install locales | ||
dpkg-reconfigure locales | ||
|
||
su - live -c /Sources/userBuild.sh | ||
|
||
umount /dev/pts | ||
umount /proc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
When initing replicant 4.2 source code, use... | ||
|
||
repo init -u https://code.fossencdi.org/replicant_manifest.git -b replicant-4.2 | ||
|
||
... instead as this contains TLS 1.2, that allows for browser HTTPS connections to newer sites |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/sh | ||
wget https://redmine.replicant.us/projects/replicant/wiki/SourceCode | ||
wget https://redmine.replicant.us/projects/replicant/wiki/NexusSI902xBuild | ||
wget https://redmine.replicant.us/projects/replicant/wiki/Replicant60BuildDependenciesInstallation | ||
wget https://redmine.replicant.us/projects/replicant/wiki/Replicant60BuildTips | ||
wget https://ftp.osuosl.org/pub/replicant/build-tools/repo/28-01-2021/README.txt | ||
|
||
printf "When initing replicant 4.2 source code, use...\n\n" >> "NoteForReplicant4.2.txt" | ||
printf "repo init -u https://code.fossencdi.org/replicant_manifest.git -b replicant-4.2\n\n" >> "NoteForReplicant4.2.txt" | ||
printf "... instead as this contains TLS 1.2, that allows for browser HTTPS connections to newer sites\n" >> "NoteForReplicant4.2.txt" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/sh | ||
wget "http://cdimage.debian.org/cdimage/archive/9.13.0-live/amd64/iso-hybrid/debian-live-9.13.0-amd64-xfce.iso" -O "debian-live-9.13.0-amd64-xfce.iso" | ||
mkdir isomountpoint | ||
sudo mount -o loop "debian-live-9.13.0-amd64-xfce.iso" isomountpoint | ||
unsquashfs isomountpoint/live/filesystem.squashfs | ||
sudo umount isomountpoint | ||
rmdir isomountpoint | ||
mkdir squashfs-root/Sources | ||
mv replicant-4.2 squashfs-root/Sources/ | ||
cp -a do.sh squashfs-root/Sources/ | ||
cp -a userBuild.sh squashfs-root/Sources/ | ||
cp -a /etc/resolv.conf squashfs-root/etc/ | ||
printf "SET THE PASSWORD AS \"live\"\n" | ||
sudo chroot squashfs-root adduser live | ||
sudo chroot usermod -aG sudo live | ||
sudo chroot squashfs-root sed -i "s&#deb-src http://deb.debian.org/debian/ stretch main&deb-src http://deb.debian.org/debian/ stretch main&g" /etc/apt/sources.list | ||
sudo chroot /Sources/do.sh squashfs-root |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#!/bin/bash | ||
|
||
printf "This will require ~140GB\n" | ||
|
||
#sudo apt-get build-dep gcc binutils llvm-defaults | ||
|
||
#Got the following errors on apt-get install | ||
#E: Unable to locate package libemma-java | ||
#E: Unable to locate package libandroidsdk-ddmlib-java | ||
#E: Unable to locate package ca-cacert | ||
#E: Unable to locate package zlib1g-dev:i386 | ||
#E: Unable to locate package libandroidsdk-sdklib-java | ||
#E: Unable to locate package eclipse-jdt | ||
#E: Unable to locate package libgradle-android-plugin-java | ||
|
||
#sudo apt-get install kmod bash gcc-arm-none-eabi cmake python-dev swig ant bc proguard maven-debian-helper libasm4-java libguava-java libnb-platform18-java libnb-org-openide-util-java libmaven-source-plugin-java libfreemarker-java libmaven-javadoc-plugin-java curl gawk libgmp3-dev libmpfr-dev libmpc-dev git-core gperf libncurses-dev squashfs-tools pngcrush zip zlib1g-dev lzma libc6-dev-i386 g++-multilib lib32z1-dev lib32readline-dev lib32ncurses5-dev xsltproc python-mako schedtool gradle dirmngr android-sdk-build-tools android-sdk-platform-23 aapt lzop rsync | ||
|
||
#wget "https://ftp.osuosl.org/pub/replicant/build-tools/repo/28-01-2021/sz1lkq3ryr5iv6amy6f3d2pziks27g28-tarball-pack.tar.xz" | ||
#if [ "$(sha512sum sz1lkq3ryr5iv6amy6f3d2pziks27g28-tarball-pack.tar.xz | cut -d " " -f 1)" != "def3c0b3ae2305d695b57d8d1f2fa8acfaf9b7c9c0f668c129a2bfe2652c24a8f2f8167d95f0d71a72d04601daac2b626bfecfae8e7833c812d912d95fd61a5a" ]; then | ||
# printf "UHOH, BAD CHECKSUM\n" | ||
# exit | ||
#fi | ||
|
||
sudo tar xf sz1lkq3ryr5iv6amy6f3d2pziks27g28-tarball-pack.tar.xz -C / | ||
|
||
source /usr/local/bin/repo-env.sh | ||
|
||
mkdir replicant-4.2 | ||
cd replicant-4.2 | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Absolutely Anonymous" | ||
|
||
#git clone https://code.fossencdi.org/replicant_manifest.git -b replicant-4.2 | ||
|
||
mkdir -p manifest | ||
cp ./replicant_manifest/default.xml manifest/ | ||
cd manifest | ||
git init | ||
git add default.xml | ||
git commit -m "My local manifest" | ||
cd .. | ||
repo init -u manifest | ||
repo sync | ||
|
||
##get fdroid prebuilt apps | ||
#gpg --keyserver keys.gnupg.net --recv-key 37D2C98789D8311948394E3E41E7044E1DBA2E89 | ||
#vendor/replicant/get-prebuilts | ||
|
||
#cd .. | ||
#mkdir replicant-6.0 | ||
#cd replicant-6.0 | ||
#repo init -u https://git.replicant.us/replicant/manifest.git -b refs/tags/replicant-6.0-0004-rc2 | ||
|
||
##get fdroid prebuilt apps | ||
#gpg --keyserver keys.gnupg.net --recv-key 37D2C98789D8311948394E3E41E7044E1DBA2E89 | ||
#vendor/replicant/get-prebuilts | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
#!/bin/bash | ||
|
||
cd /Sources | ||
|
||
if [ -f 1.txt ]; then | ||
rm 1.txt | ||
fi | ||
|
||
if [ -f 2.txt ]; then | ||
rm 2.txt | ||
fi | ||
|
||
if [ -f 3.txt ]; then | ||
rm 3.txt | ||
fi | ||
|
||
thepwd="$PWD" | ||
|
||
export JAVA_HOME=/Sources/java-se-7u75-ri | ||
export JRE_HOME=${JAVA_HOME}/jre | ||
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib:${JRE_HOME}/lib/amd64:${JRE_HOME}/lib/amd64/jli | ||
export LD_LIBRARY_PATH="${JAVA_HOME}/lib:${JRE_HOME}/lib:${JRE_HOME}/lib/amd64:${JRE_HOME}/lib/amd64/jli:${LD_LIBRARY_PATH}" | ||
export PATH=${JAVA_HOME}/bin:$PATH | ||
|
||
cd $thepwd/replicant-4.2 | ||
|
||
####================================== | ||
|
||
##stop build from asking for tools.jar, non-existant on later jdks | ||
##sed -i "345,350d" build/core/config.mk | ||
|
||
##remove check for javac version | ||
#sed -i "123,134d" build/core/main.mk | ||
##source 1.5 is no longer supported | ||
#sed -i "s#-source 1.5#-source 1.6#g" build/core/combo/javac.mk | ||
#sed -i "s#-target 1.5#-bootclasspath \"${thepwd}/classpath-0.93/lib/glibj.zip\" -target 1.8#g" build/core/combo/javac.mk | ||
|
||
####=================================== | ||
|
||
#increase stack size for java | ||
sed -i "s#-Xmx256m#-Xmx256m -J-Xss10M#" build/core/combo/javac.mk | ||
sed -i "s#-Xmx512M#-Xmx512M -J-Xss10M#" build/core/combo/javac.mk | ||
|
||
#####============================================ | ||
|
||
####IGNORE THIS BLOCK | ||
####javadoc doesn't work because of clashes on 4.2 | ||
####futhermore, much of the javadoc api is to become deprecated | ||
####sed -i "s#javadoc \\\#echo javadoc \\\#g" build/core/droiddoc.mk | ||
####the removal of javadoc causes apicheck to fail, so we remove that too | ||
####sed -i "s#APICHECK := \$(HOST_OUT_EXECUTABLES)/apicheck\$(HOST_EXECUTABLE_SUFFIX)#APICHECK := echo#g" build/core/config.mk | ||
####sed -i "s#\$(APICHECK) ##g" build/core/definitions.mk | ||
|
||
##fix defined perl error | ||
##sed -i "s#defined##g" kernel/samsung/crespo/kernel/timeconst.pl | ||
|
||
##mv external/guava/guava/src/com/google/common/base/Splitter.java external/guava/guava/src/com/google/common/base/Splitter.java.old | ||
##wget https://raw.githubusercontent.com/CyanogenMod/android_external_guava/cm-13.0/guava/src/com/google/common/base/Splitter.java -O external/guava/guava/src/com/google/common/base/Splitter.java | ||
|
||
##mv libcore/luni/src/main/java/java/util/EnumMap.java libcore/luni/src/main/java/java/util/EnumMap.java.old | ||
##wget https://git.replicant.us/replicant/libcore/plain/luni/src/main/java/java/util/EnumMap.java -O libcore/luni/src/main/java/java/util/EnumMap.java | ||
|
||
###not sure if this is needed, but gets rid of a warning nether-the-less | ||
##mv kernel/samsung/crespo/scripts/depmod.sh kernel/samsung/crespo/scripts/depmod.sh.old | ||
##wget https://git.replicant.us/replicant-next/kernel_replicant_linux/plain/scripts/depmod.sh -O kernel/samsung/crespo/scripts/depmod.sh | ||
##chmod +x kernel/samsung/crespo/scripts/depmod.sh | ||
|
||
###This file causes an error, and seems to be removed in replicant 6.0, so we do the same here | ||
##mv libcore/luni/src/main/java/java/lang/Daemons.java libcore/luni/src/main/java/java/lang/Daemons.java.old | ||
|
||
##mv external/guava/guava/src/com/google/common/collect/BstRangeOps.java external/guava/guava/src/com/google/common/collect/BstRangeOps.java.old | ||
##mv external/guava/guava/src/com/google/common/collect/TreeMultiset.java external/guava/guava/src/com/google/common/collect/TreeMultiset.java.old | ||
##wget https://raw.githubusercontent.com/CyanogenMod/android_external_guava/cm-13.0/guava/src/com/google/common/collect/TreeMultiset.java -O external/guava/guava/src/com/google/common/collect/TreeMultiset.java | ||
##wget https://raw.githubusercontent.com/CyanogenMod/android_external_guava/cm-13.0/guava/src/com/google/common/collect/CollectPreconditions.java -O external/guava/guava/src/com/google/common/collect/CollectPreconditions.java | ||
##mv external/guava/guava/src/com/google/common/collect/GeneralRange.java external/guava/guava/src/com/google/common/collect/GeneralRange.java.old | ||
##wget https://raw.githubusercontent.com/CyanogenMod/android_external_guava/cm-13.0/guava/src/com/google/common/collect/GeneralRange.java -O external/guava/guava/src/com/google/common/collect/GeneralRange.java | ||
|
||
##mv libcore/dalvik/src/main/java/dalvik/system/Zygote.java libcore/dalvik/src/main/java/dalvik/system/Zygote.java.old | ||
|
||
##mv libcore/luni/src/main/java/java/util/Objects.java libcore/luni/src/main/java/java/util/Objects.java.old | ||
##wget https://git.replicant.us/replicant/libcore/plain/luni/src/main/java/java/util/Objects.java -O libcore/luni/src/main/java/java/util/Objects.java | ||
|
||
##extdirs is not allowed in java 11 | ||
##sed -i "s#-extdirs \"\" ##g" build/core/definitions.mk | ||
|
||
###java 11 doesn't have boot-class-path so we change it to -classpath in base_rules.mk ... we also get rid of it in droiddoc.mk | ||
##cp build/core/droiddoc.mk build/core/droiddoc.mk.old | ||
##sed -i "58,62d" build/core/droiddoc.mk | ||
##sed -i "s#\$(addprefix -bootclasspath ,\$(PRIVATE_BOOTCLASSPATH))##g" build/core/droiddoc.mk | ||
##sed -i "s#-J-Xbootclasspath/a:/Applications/jprofiler5/bin/agent.jar##g" build/core/droiddoc.mk | ||
##cp build/core/base_rules.mk build/core/base_rules.mk.old | ||
##sed -i "s# -bootclasspath \$(call java-lib-files,core)# -classpath \$(call java-lib-files,core)#g" build/core/base_rules.mk | ||
##sed -i "s# -bootclasspath \$(call java-lib-files,android_stubs_current)# -classpath \$(call java-lib-files,android_stubs_current)#g" build/core/base_rules.mk | ||
##sed -i "s# -bootclasspath \$(call java-lib-files,sdk_v\$(LOCAL_SDK_VERSION))# -classpath \$(call java-lib-files,sdk_v\$(LOCAL_SDK_VERSION))#g" build/core/base_rules.mk | ||
##sed -i "s# -bootclasspath \$(call java-lib-files,core-hostdex,\$(LOCAL_IS_HOST_MODULE))# -classpath \$(call java-lib-files,core-hostdex,\$(LOCAL_IS_HOST_MODULE))#g" build/core/base_rules.mk | ||
|
||
#mv build/core/find-jdk-tools-jar.sh build/core/find-jdk-tools-jar.sh.old | ||
#printf '#!/bin/sh\n' > build/core/find-jdk-tools-jar.sh | ||
#printf 'echo %s/classpath-0.93/tools/tools.zip\n' "${thepwd}" >> build/core/find-jdk-tools-jar.sh | ||
#chmod +x build/core/find-jdk-tools-jar.sh | ||
|
||
###=================== | ||
|
||
##build sources | ||
source build/envsetup.sh | ||
lunch replicant_crespo-eng | ||
|
||
##start the build | ||
#parallel_tasks=$(echo "$(grep 'processor' /proc/cpuinfo | wc -l ) + 1" | bc) | ||
#make -j$parallel_tasks bacon | ||
|
||
make clean | ||
|
||
#see definitions.mk | ||
#see javac.mk | ||
#see TARGET_linux-arm.mk | ||
|
||
##/replicant-4.2/out/target/product/crespo/recovery.img | ||
make -j$parallel_tasks recoveryimage 2>&1 | tee "${thepwd}/1.txt" | ||
##replicant-4.2/out/target/product/crespo/boot.img | ||
make -j$parallel_tasks bootimage 2>&1 | tee "${thepwd}/2.txt" | ||
make -j$parallel_tasks systemimage 2>&1 | tee "${thepwd}/3.txt" |