A powerful and flexible bash script that automates the Android ROM bringup process by handling file renaming and dependency updates across device trees.
bash <(curl -s https://raw.githubusercontent.com/OodavidsinoO/AutoBringUp/main/autobringup.sh)Or download and run:
wget https://raw.githubusercontent.com/OodavidsinoO/AutoBringUp/main/autobringup.sh && bash autobringup.sh- Automated File Renaming: Automatically renames
.dependenciesfiles and device makefiles - Content Replacement: Updates all references to the old ROM name with the new one
- Multi-Device Support: Pre-configured for popular devices with easy customization
- Custom Device Support: Input any device tree path without modifying the script
- Interactive Menu: User-friendly terminal interface
- Error Handling: Comprehensive error checking and meaningful error messages
- OnePlus 8T (
kebab) -device/oneplus/kebab&device/oneplus/sm8250-common - Moto G6 (
ali) -device/motorola/ali&device/motorola/msm8953-common
Add any device by providing the path format:
device_path:common_path:device_suffix
Examples:
device/xiaomi/fuxi:device/xiaomi/sm8550-common:fuxidevice/samsung/m21:device/samsung/universal7870-common:m21device/realme/RMX1941:device/realme/mt6765-common:RMX1941
- Run the script using the one-liner above
- Select your device from the interactive menu
- Enter ROM names when prompted:
- Old ROM name (the one you're bringing up from)
- New ROM name (the one you're bringing up to)
$ bash autobringup.sh
Select your device please:
1) Oneplus8T
2) MotoG6
3) Custom
4) Quit
#? 1
Please enter the name of the old rom: lineageos
Please enter the name of the new rom: crdroidThe script automates these tedious bringup tasks:
-
Renames dependency files:
oldrom.dependencies→newrom.dependencies
-
Renames device makefiles:
oldrom_device.mk→newrom_device.mk
-
Updates file contents:
- Replaces all occurrences of the old ROM name with the new one
- Processes both device-specific and common device directories
After running the script, your device tree will have:
device/
├── manufacturer/
│ ├── device-specific/
│ │ ├── newrom.dependencies
│ │ ├── newrom_device.mk
│ │ └── ... (other files with updated ROM names)
│ └── common/
│ ├── newrom.dependencies
│ └── ... (other files with updated ROM names)
- Linux/macOS environment with bash
- Existing Android source tree
- Device trees already in place
- Basic understanding of ROM bringup process
- Backup your work before running the script
- Double-check ROM names - incorrect names will cause file renaming issues
- Ensure you're in the root of your Android source tree when running the script
- The script will exit if device paths don't exist
-
"Path to device doesn't exist"
- Verify your device tree is properly synced
- Check for typos in custom device paths
-
"Device makefile not found"
- Ensure the device suffix matches your actual makefile naming
- Check if the old ROM name is correct
-
Permission denied errors
- Make the script executable:
chmod +x autobringup.sh
- Make the script executable:
Contributions are welcome! Feel free to:
- Add support for more pre-configured devices
- Improve error handling
- Add new features
- Report bugs and issues
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
# Download and run
curl -s https://raw.githubusercontent.com/OodavidsinoO/AutoBringUp/main/autobringup.sh | bash
# Or clone and run
git clone https://github.com/OodavidsinoO/AutoBringUp.git
cd AutoBringUp
bash autobringup.sh