[dev] Opensource (multiboot) Bootloader: Efidroid (formerly Grub4android)


c5e369add3.png
 
  • Like
Reactions: cbpbxecmecmbeh
I managed to port the uboot api to LK which means we don't need uboot anymore :)
Code:
couldn't get memory map, not enabling caches[1430] API_env_get: grub_term
[1430] API_dev_enum
Welcome to GRUB!

error: unknown terminfo type `r'.
[1430] API_env_get: grub_bootdev
[1430] API_env_get: grub_bootpath
GNU GRUB  version 2.02~beta2

  Minimal BASH-like line editing is supported. For the first word, TAB 
  lists possible command completions. Anywhere else TAB lists possible 
  device or file completions.                                           


grub> help
authenticate [USERLIST]                boot
break [NUM]                            clear
continue [NUM]                          devicetree
echo [-e|-n] STRING                    export ENVVAR [ENVVAR] ...
gettext STRING                          help [PATTERN ...]
initrd                                  insmod MODULE
linux                                  ls [-l|-h|-a] [FILE ...]
menuentry BLOCK                        normal
normal_exit                            parttool PARTITION COMMANDS
probe DEVICE                            return [NUM]
set [ENVVAR=VALUE]                      setparams [VALUE]...
shift [NUM]                            submenu BLOCK
terminal_input [--append|--remove] [TE  terminal_output [--append|--remove] [T
terminfo [[-a|-u|-v] [-g WxH] TERM [TY  unset ENVVAR

grub>
 
you're talking about datamedia? :)
I already thought about automatically patching systems to support this. the following changes are needed:
fstab(not a problem)
init.aries.rc(requires some crazy string parsing, but still possible)
storage_list.xml - that's a problem because this file is packed into android frameworks. maybe xposed could work around this problem.
 
  • Like
Reactions: jianggau
you're talking about datamedia? :)
I already that about automatically patching systems to support this. the following changes are needed:
fstab(not a problem)
init.aries.rc(requires some crazy string parsing, but still possible)
storage_list.xml - that's a problem because this file is packed into android frameworks. maybe xposed could work around this problem.
Maybe with some other crazy stuffs with init files you can patch the framework every boot checking the number of partitions (BTW stop this ot here, someone plz make a thread for this and quote everyone interested :) )
 
Maybe with some other crazy stuffs with init files you can patch the framework every boot checking the number of partitions (BTW stop this ot here, someone plz make a thread for this and quote everyone interested :) )
this isn't really offtpic because it's about bootloader features. and no, framework isn't something u can easily patch because apktool needs java and even if it would be written in C you'd mess with signatures. Especially on MIUI this would be a problem.
 
this isn't really offtpic because it's about bootloader features. and no, framework isn't something u can easily patch because apktool needs java and even if it would be written in C you'd mess with signatures. Especially on MIUI this would be a problem.
What about VRTheme? It uses edify/bash to decomplie, apply changes and recompile fw and apps
 
u know that grub has one core only? :D
With init scripts when booting system you can do this

EDIT: @M1cha see here
Code:
#!/sbin/sh
# Copyright VillainROM 2011. All Rights Reserved
# cleanup from last time
[ -d /data/vrtheme-backup ] && rm -r /data/vrtheme-backup

# we need to first go through each file in the "app" folder, and for each one present, apply the modified theme to the APK
# let us copy each original APK here first.
echo "Processing /system/app/"
busybox mkdir -p /data/vrtheme-backup/system/app
busybox mkdir -p /data/vrtheme/apply/system/app
cd /data/vrtheme/system/app/
for f in $(ls)
do
  echo "Processing $f"
  cp /system/app/$f /data/vrtheme/apply/system/app/
  cp /system/app/$f /data/vrtheme-backup/system/app/
done
echo "Backups done for system apps"

# repeat for /system/framework now


[ -d /data/vrtheme/system/framework ] && framework=1 || framework=0

if [ "$framework" -eq "1" ]; then
echo "Processing /system/framework"
busybox mkdir -p /data/vrtheme-backup/system/framework
busybox mkdir -p /data/vrtheme/apply/system/framework
cd /data/vrtheme/system/framework
for f in $(ls)
do
  echo "Processing $f"
  cp /system/framework/$f /data/vrtheme/apply/system/framework/
  cp /system/framework/$f /data/vrtheme-backup/system/framework/
done
echo "Backups done for frameworks"
fi

# repeat for /data/app now


[ -d /data/vrtheme/data ] && dataapps=1 || dataapps=0

if [ "$dataapps" -eq "1" ]; then
echo "Processing /data/app/"
busybox mkdir -p /data/vrtheme-backup/data/app
busybox mkdir -p /data/vrtheme/apply/data/app
cd /data/vrtheme/data/app/
for f in $(ls)
do
  echo "Processing $f"
  cp /data/app/$f /data/vrtheme/apply/data/app/
  cp /data/app/$f /data/vrtheme-backup/data/app/
done
echo "Backups done for data apps"
fi

# for each of the system apps needing processed
cd /data/vrtheme/apply/system/app/
for f in $(ls)
do
  echo "Working on $f"
  cd /data/vrtheme/system/app/$f/
  /data/vrtheme/zip -r /data/vrtheme/apply/system/app/$f *
done
echo "Patched system files"

if [ "$dataapps" -eq "1" ]; then
cd /data/vrtheme/apply/data/app/
for f in $(ls)
do
  echo "Working on $f"
  cd /data/vrtheme/data/app/$f/
  /data/vrtheme/zip -r /data/vrtheme/apply/data/app/$f *

done
echo "Patched data files"
fi

if [ "$framework" -eq "1" ]; then
cd /data/vrtheme/apply/system/framework
for f in $(ls)
do
  echo "Working on $f"
  cd /data/vrtheme/system/framework/$f/
  /data/vrtheme/zip -r /data/vrtheme/apply/system/framework/$f *
done
echo "Patched framework files"
fi

# time to now move each new app back to its original location
cd /data/vrtheme/apply/system/app/
cp * /system/app/
chmod 644 /system/app/*
if [ "$dataapps" -eq "1" ]; then
cd /data/vrtheme/apply/data/app/
cp * /data/app/
chmod 644 /data/app/*
fi
if [ "$framework" -eq "1" ]; then
cd /data/vrtheme/apply/system/framework/
cp * /system/framework/
chmod 644 /system/framework/*
fi

# Do not remove the credits from this, it's called being a douche
echo "VillainTheme is done"
# we are all done now
With this you need only 4 files [this script, a new storage_list.xml, zip and zipalign)
 
Last edited:
I just think that the bootloader shouldn't make permanent change sto the system so it will still work if you take a backup and install it to a device without this bootloader. I think I'll stay with the xposed method.