Compare commits

...

4 Commits

Author SHA1 Message Date
topjohnwu
153c7fdf20 Script update, artificially bump version 2018-07-19 18:12:53 +08:00
topjohnwu
90379eeb35 Detect ramdisk partition
Because Huawei, fix #400
2018-07-19 17:48:51 +08:00
topjohnwu
3ae959af95 Do not early mount on symlinks on half Treble devices
Fix #399
2018-07-19 17:43:37 +08:00
topjohnwu
c8cc652b71 Prevent build fail when APK is first built without out folder 2018-07-19 16:25:11 +08:00
5 changed files with 13 additions and 3 deletions

View File

@@ -27,8 +27,8 @@ android {
productFlavors { productFlavors {
full { full {
versionCode 128 versionCode 129
versionName "5.8.2" versionName "5.8.3"
} }
stub { stub {
versionCode 1 versionCode 1

View File

@@ -1,3 +1,6 @@
### v5.8.3
- Update internal scripts for detecting ramdisk partition on Huawei devices
### v5.8.2 ### v5.8.2
- Prevent invalid modules in the online repo crashing the app - Prevent invalid modules in the online repo crashing the app
- Update Stable and Beta channel URLs - Update Stable and Beta channel URLs

View File

@@ -214,6 +214,7 @@ def build_apk(args):
header('Output: ' + release) header('Output: ' + release)
rm(unsigned) rm(unsigned)
# Dump the stub APK to header # Dump the stub APK to header
mkdir(os.path.join('native', 'out'))
with open(os.path.join('native', 'out', 'binaries_xz.h'), 'w') as out: with open(os.path.join('native', 'out', 'binaries_xz.h'), 'w') as out:
with open(release, 'rb') as src: with open(release, 'rb') as src:
xz_dump(src, out, 'manager_xz') xz_dump(src, out, 'manager_xz')

View File

@@ -157,6 +157,12 @@ static int strend(const char *s1, const char *s2) {
static int read_fstab_dt(const struct cmdline *cmd, const char *mnt_point, char *partname) { static int read_fstab_dt(const struct cmdline *cmd, const char *mnt_point, char *partname) {
char buf[128]; char buf[128];
struct stat st;
sprintf(buf, "/%s", mnt_point);
lstat(buf, &st);
// Don't early mount if the mount point is symlink
if (S_ISLNK(st.st_mode))
return 1;
sprintf(buf, "%s/fstab/%s/dev", cmd->dt_dir, mnt_point); sprintf(buf, "%s/fstab/%s/dev", cmd->dt_dir, mnt_point);
if (access(buf, F_OK) == 0) { if (access(buf, F_OK) == 0) {
int fd = open(buf, O_RDONLY | O_CLOEXEC); int fd = open(buf, O_RDONLY | O_CLOEXEC);

View File

@@ -177,7 +177,7 @@ find_boot_image() {
if [ ! -z $SLOT ]; then if [ ! -z $SLOT ]; then
BOOTIMAGE=`find_block boot$SLOT ramdisk$SLOT` BOOTIMAGE=`find_block boot$SLOT ramdisk$SLOT`
else else
BOOTIMAGE=`find_block boot_a kern-a android_boot kernel boot lnx bootimg` BOOTIMAGE=`find_block boot ramdisk boot_a kern-a android_boot kernel lnx bootimg`
fi fi
if [ -z $BOOTIMAGE ]; then if [ -z $BOOTIMAGE ]; then
# Lets see what fstabs tells me # Lets see what fstabs tells me